diff --git a/config/gisaid/__init__.py b/config/gisaid/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/docs/app.json b/docs/app.json index 50496bc..5e8c7c1 100644 --- a/docs/app.json +++ b/docs/app.json @@ -1 +1 @@ -[{"name": "app.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n###################### CSS #######################\nimport pandas as pd\nfrom shinyswatch import theme\nimport shiny_tools\nfrom index import index_body\nfrom setup import setup_body\nfrom about import about_body\nfrom prerequisites import prerequisites_body\nfrom my_first_submission import first_submission_body\nimport pathlib\nimport yaml\nfrom yaml import SafeDumper\n\nterminal_css = \"\"\nyaml_css = \"background-color: #F0F0F0;white-space: nowrap; font-size: 20px ;margin-top:-15px;font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;-webkit-user-select: none; -ms-user-select: none; user-select: none;\"\n############ HEADER #######################\nheader = (\n ui.card_header(\n ui.HTML(\n \"\"\"

Beta Version: 1.5.0 This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!

\"\"\"\n )\n ),\n)\n############## FOOTER #######################\nfooter = (\n ui.card_footer(\n ui.HTML(\n \"\"\"

General Disclaimer: This repository was created for use by CDC programs to collaborate on public health related projects in support of the CDC mission. GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.

\"\"\"\n ),\n ),\n)\n############### FUNCTIONS #########################\nui.input_checkbox_group(\n \"select_databases\",\n \"Select Database(s):\",\n {\n \"GenBank\": ui.span(\"GenBank\"),\n \"SRA\": ui.span(\"SRA\"),\n \"BioSample\": ui.span(\"BioSample\"),\n },\n),\n\n####################### INSTALLATION PAGE ###########################\n#### LOCAL INSTALLATION\nlocal_installation_content = [\n shiny_tools.software_requirements(\"Local\"),\n ui.HTML(\n \"\"\"\n

Micromamba Installation

\n

Here we recommend using micromamba to set up a virtual environment to run seqsender. Micromamba is a tiny, statically linked C++ reimplementation of mamba which is an alternative to conda. The tool works as a standalone package manager that supports a subset of all mamba or conda commands, but it also has its own separate command line interfaces. For more information, visit micromamba documentation.

\n

To manually install, download and unzip the executable from the official conda-forge package to your $HOME directory using tar.

\n
cd $HOME
\nLINUX\n
# Linux Intel (x86_64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba\n# Linux ARM64:\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-aarch64/latest | tar -xvj bin/micromamba\n# Linux Power:\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-ppc64le/latest | tar -xvj bin/micromamba
\nmacOS\n
# macOS Intel (x86_64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba\n# macOS Silicon/M1 (ARM64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/osx-arm64/latest | tar -xvj bin/micromamba
\n

After the extraction is completed, you can find the executable at $HOME/bin/micromamba

\n\n
export MAMBA_ROOT_PREFIX="$HOME/micromamba"\neval "$($HOME/bin/micromamba shell hook -s posix)"
\n\n
# >>> mamba initialize >>>\nexport MAMBA_EXE="$HOME/bin/micromamba";\nexport MAMBA_ROOT_PREFIX="$HOME/micromamba";\n__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"\nif [ $? -eq 0 ]; then\n    eval "$__mamba_setup"\nelse\n    alias micromamba="$MAMBA_EXE"  # Fallback on help from mamba activate\nfi\nunset __mamba_setup\n# <<< mamba initialize <<<
\n\n
micromamba --version\n1.5.6
\n

Set up a micromamba environment

\n
    \n
  1. Clone this repository to your $HOME directory
  2. \n
\n
cd $HOME\ngit clone https://github.com/CDCgov/seqsender.git
\n
    \n
  1. CD to seqsender folder where the env.yaml file is stored. Let\u2019s create a virtual environment named mamba that contains all dependencies needed to run seqsender from the source file.
  2. \n
\n
cd seqsender\nmicromamba create --name seqsender --file env.yaml
\n
    \n
  1. Activate the named environment \u2013 seqsender
  2. \n
\n
micromamba activate seqsender
\n

Run seqsender within the mamba environment

\n
python seqsender.py --help
\"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Local\"),\n ui.HTML(\n \"\"\"\n

To see the arguments required for each command, for example, the submit command, run

\n
python seqsender.py submit --help
\n\"\"\"\n ),\n shiny_tools.seqsender_submit_help_output_msg(\"Local\"),\n]\n#### DOCKER INSTALLATION\ndocker_installation_content = [\n shiny_tools.software_requirements(\"Docker\"),\n ui.HTML(\n \"\"\"\n

Clone seqsender repo to your $HOME directory and navigate to the repo

\n
cd $HOME\ngit clone https://github.com/CDCgov/seqsender.git\ncd seqsender
\"\"\"\n ),\n ui.navset_card_pill(\n ui.nav_panel(\n \"Docker-Build\",\n [\n ui.HTML(\n \"\"\"\n

In the directory where the Dockerfile is stored, build docker image

\n
docker build -t seqsender:latest .
\n

-t: add a tag to an image, e.g.\u00a0seqsender:1.0.0 or seqsender:latest

\n
\n

After the build is complete, you can check if the image is created successfully.

\n
docker images
\"\"\"\n ),\n ui.card(\n ui.HTML(\n \"\"\"\ndocker images
\nREPOSITORY TAG |  IMAGE ID |  CREATED | SIZE
\nseqsender latest d9e2578d2211 2 weeks ago 581GB\n\"\"\"\n ),\n style=terminal_css,\n ),\n ui.HTML(\n \"\"\"\n

Run seqsender container

\n
docker run \\\n-v $HOME:/data \\\n-t -d seqsender:latest \\\n--name seqsender
\n

-t: allocate a pseudo-tty
-d: run the container in detached mode
-v: mount data files from host directory to container directory [host_div]:[container_dir]. By exposing the host directory to docker container, docker will be able to access data files within that mounted directory and use it to fire up the seqsenderworkflows. NOTE: Here we are mounting the local $HOME directory to /data directory inside the container.
--name: give an identity to the container

\n

For more information about the Docker syntax, see Docker run reference

\"\"\"\n ),\n ],\n ),\n ui.nav_panel(\"Docker-Compose\",\n ui.h2(\"Update docker-compose.yaml for your local storage\"),\n ui.p(ui.strong(\"Note: \"), ui.code(\"source\"), \" is the storage location of your local machine. This location will be mapped to \", ui.code(\"/data\"), \" directory inside of the container. Here we are mounting the local variable \", ui.code(\"$HOME\"), \" directory to \", ui.code(\"/data\"), \" inside of the container. Change the value \", ui.code(\"$HOME\"), \" to reflect your local storage system.\"),\n ui.card(ui.HTML(\n \"\"\"\nversion: \"3.9\"
\nx-data-volumes:
\n  &data-volume
\n  type: bind
\n  source: $HOME
\n  target: /data
\n
\nservices:
\n  seqsender:
\n    container_name: seqsender
\n    image: seqsender:latest
\n    build:
\n      context: .
\n      dockerfile: Dockerfile
\n      args:
\n        - micromamba_version=1.5.3
\n    restart: always
\n    volumes:
\n      - *data-volume
\n    command: tail -f /dev/null
\n
\"\"\"\n ),\n style=terminal_css,\n ),\n ui.h2(\"Start \", ui.code(\"seqsender\"), \" container\"),\n ui.card(\n ui.p(ui.code(\"docker-compose up -d\")),\n style=terminal_css,\n ),\n ui.p(\"Running docker-compose with the flag \", ui.code(\"-d\"), \" runs the container in detached mode, allowing the container to continue to run in the background. For more information refer to \", ui.a(\"docker-compose documentation\", href=\"https://docs.docker.com/reference/cli/docker/compose/up/\"), \".\"),\n ),\n id=\"docker_options\",\n ),\n ui.HTML(\n \"\"\"\n

Check if the container is created successfully

\n
docker container ps
\n\"\"\"\n ),\n ui.card(\n ui.HTML(\n \"\"\"\ndocker container ps
\nCONTAINER ID |  | IMAGE |  |  COMMAND |  | CREATED |  STATUS | PORTS | NAMES
\nb37b6b19c4e8 seqsender:latest "/bin/bash" 5 hours ago Up 5 hours |  | seqsender\n\"\"\"\n ),\n style=terminal_css,\n ),\n ui.HTML(\n \"\"\"\n

See a list of commands in seqsender container

\n
docker exec -it seqsender bash seqsender-kickoff --help
\n

-t: allocate a pseudo-tty
-i: keep STDIN open even if not attached
-h, --help: show help messages and exit

\n\"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Docker\"),\n]\n#### SINGULARITY INSTALLATION\nsingularity_installation_content = [\n shiny_tools.software_requirements(\"Singularity\"),\n ui.HTML(\n \"\"\"\n

Convert seqsender Docker image into a Singularity image

\n

There is a seqsender Docker image already built and stored on our DockerHub registry: cdcgov/seqsender-dev:latest. You can directly pull the Docker Image down from the registry, convert it into a Singularity image, and store it in a destination of your choice.

\n
singularity build ~/singularity/seqsender.sif docker://cdcgov/seqsender-dev:latest
\n

After the Singularity image is built successfully, we can go ahead and use it to run seqsender

\n

Here is the command that shows the help messages of seqsender

\n
mkdir ~/singularity\nsingularity exec ~/singularity/seqsender.sif seqsender-kickoff --help
\n\"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Singularity\"),\n ui.HTML(\n \"\"\"\n

To see the arguments required for each command, for example, the submit command, run

\n
singularity exec ~/singularity/seqsender.sif seqsender-kickoff submit --help
\n\"\"\"\n ),\n shiny_tools.seqsender_submit_help_output_msg(\"Singularity\"),\n]\ninstallation_body = [\n ui.h2(\"Installation\"),\n ui.navset_tab(\n ui.nav_panel(\"Local\", local_installation_content),\n ui.nav_panel(\"Docker\", docker_installation_content),\n ui.nav_panel(\"Singularity\",singularity_installation_content),\n id=\"installation_tab\",\n ),\n]\n\n\n####################### TEST SUBMISSIONS PAGE ##############################\nuser_data_content = (\n [\n ui.p(\"Content Panel A\"),\n ],\n)\n\nexample_data_content = (\n [\n ui.br(),\n ui.p(\"Access the example data by:\"),\n ui.p(\n \"First, use the \",\n ui.code(\"prep\"),\n \" command to generate all the necessary files for submission. This step is not required for submitting to databases, as this command is ran when running the \",\n ui.code(\"submit\"),\n \" command. However, it is helpful to test/debug your submission without submitting to a database and allows you to visualize all of the files generated for submission.\",\n ),\n shiny_tools.seqsender_example_command(\"local\", \"prep\", \"\"),\n ui.p(\n \"After you've validated that your data is being generated correctly using command \",\n ui.code(\"prep\"),\n \", you can now make a test submission to the database. Database submissions are made using the \",\n ui.code(\"submit\"),\n \" command, be sure to always include the flag \",\n ui.code(\"--test\"),\n \" when submitting test submissions.\",\n ),\n shiny_tools.seqsender_example_command(\"local\", \"submit\", \"--test\"),\n ui.p(\n \"Now that your submission has been made you can check its submission progress using the \",\n ui.code(\"check_submission_status\"),\n \" command.\",\n ),\n ],\n)\n\ntesting_body = [\n ui.h2(\"Test Submissions\"),\n ui.p(\n \"Test submissions can be made with either the provided test files or your own data.\"\n ),\n ui.navset_tab(\n ui.nav_panel(\"I have my own data\", user_data_content),\n ui.nav_panel(\"I don't have my own data\", example_data_content),\n id=\"testing_tab\",\n selected=\"I don't have my own data\",\n ),\n]\n\n####################### OUTPUT FILE PAGE ###################\n\noutput_body = [\n ui.h2(\"SeqSender Output Files\"),\n ui.p(\"Output files described below are split into two categories: \", ui.strong(\"SeqSender output\"), \" or \", ui.strong(\"database specific\"), \" which lists all the files that can appear in your database submission directory (\", ui.code(\"<--submission_dir>/<--submission_name>/submission_files/\"), \"). Files generated will also change for each directory based on the SeqSender submission process for the database, metadata provided, and database submission response files. \"),\n ui.h4(\"SeqSender script output:\"),\n ui.hr(),\n ui.h6(\"submission_log.csv\"),\n ui.tags.ul(\n ui.p(\"The \", ui.strong(\"submission_log.csv\"), \" is used by Seqender to track the submission status of each of your submissions made. SeqSender updates each \", ui.strong(\"Submission_Name\"), \" that does not have a complete \", ui.strong(\"Submission_Status\"), \" by loading the relevant \", ui.strong(\"Submission_Directory\"), \" and \", ui.strong(\"Config_File\"), \".\"),\n ui.tags.ul(\n shiny_tools.file_output_column_info(column_name=\"Submission_Name\",\n description=(\"Unique \", ui.code(\"--submission_name\"), \" used when making your submission via the \", ui.code(\"submit\"), \" command. Used by SeqSender to locate the currect submission directory and to name your batch submission during the upload process.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Organism\",\n description=(\"Submission organism option \", ui.code(\"--organism\"), \" when making your submission which can enable certain additional submission options.\"),\n controlled_fields=[((ui.code(\"FLU\"), \"|\", ui.code(\"COV\")), (\"For \", ui.strong(\"Influenza Virus A\"), \" or \", ui.strong(\"Severe Acute Respiratory Syndrome Coronavirus 2\"), \", it enables GenBank (via FTP) as submission options.\")),\n ((ui.code(\"OTHER\")), (\"For any organism without additional submission options. It provides access to the default available databases: BioSample, SRA, and GenBank (table2asn via email).\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Database\",\n description=\"Database being submitted to.\",\n controlled_fields=[((ui.code(\"BIOSAMPLE\"), \"|\", ui.code(\"SRA\"), \"|\", ui.code(\"GENBANK-TBL2ASN\"), \"|\", ui.code(\"GENBANK-FTP\")), (\"Specifies the database being submitted to. For GenBank, it also includes the submission method for table2asn as \\\"-TBL2ASN\\\" or FTP as \\\"-FTP\\\".\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Type\",\n description=\"Whether the submission you're making is live or a test.\",\n controlled_fields=[((ui.code(\"TEST\"), \"|\", ui.code(\"PRODUCTION\")), (\"Test or live (production) submission.\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Date\",\n description=(\"Date submission was started with the SeqSender \", ui.code(\"submit\"), \" command.\"),\n controlled_fields=[((ui.code(\"YYYY-MM-DD\")), (\"ISO-8601 standard date format. (i.e. 2024-01-01, 2024-12-31)\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Status\",\n description=(\"Current status of the submission to the database specified. \\\"GENBANK-TBL2ASN\\\" uses \", ui.strong(\"EMAILED\"), \" instead of \", ui.strong(\"PROCESSED\"), \" to designate the submission is complete.\"),\n controlled_fields=[((ui.code(\"SUBMITTED\")), (\"Submission has been uploaded to NCBI database.\")),\n ((ui.code(\"CREATED\")), (\"NCBI is currently loading the submission files.\")),\n ((ui.code(\"QUEUED\")), (\"NCBI has queued your submission for processing.\")),\n ((ui.code(\"PROCESSING\")), (\"Submission is currently processing for NCBI database. When the \", ui.code(\"submission_status\"), \" command is ran again it will attempt to submit the rest of the samples.\")),\n ((ui.code(\"FAILED\")), (\"Submission failed processing for NCBI database.\")),\n ((ui.code(\"PROCESSED\")), (\"Submission has been successfully uploaded to NCBI.\")),\n ((ui.code(\"ERROR\")), (\"SeqSender failed to process report for NCBI database.\")),\n ((ui.code(\"WAITING\")), (\"Submission is waiting on other submissions to complete processing, to correctly link information.\")),\n ((ui.code(\"DELETED\")), (\"NCBI has deleted your submission. This could be because your submission remained errored for too long without resolution or you requested to have the submission removed.\")),\n ((ui.code(\"RETRIED\")), (\"NCBI has attempted retrying processing of your submission.\")),\n ((ui.code(\"VALIDATED\")), (\"SeqSender has used table2asn to validate that your sqn file is correct.\")),\n ((ui.code(\"EMAILED\")), (\"SeqSender has successfully emailed your table2asn submission to upload it to GenBank.\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_ID\",\n description=(\"NCBI submission ID tied to the \", ui.code(\"Submission_Name\"), \".\"),\n controlled_fields=[((ui.code(\"PENDING\"), \"|\", ui.code(\"SUB#\"), \"|\", ui.code(\"SUBMITTED\")), (\"Until submission ID is generated it will use \", ui.strong(\"PENDING\"), \".\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Directory\",\n description=(\"Full file path for the specified \", ui.strong(\"Submission_Name\"), \", \", ui.strong(\"Database\"), \", submission directory.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Config_File\",\n description=(\"Full file path for the \", ui.code(\"--config_file\"), \" input provided during the \", ui.code(\"submit\"), \" command.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Update_Date\",\n description=(\"Date submission was last updated with SeqSender via the \", ui.code(\"submission_status\"), \" command.\"),\n controlled_fields=[((ui.code(\"YYYY-MM-DD\")), (\"ISO-8601 standard date format. (i.e. 2024-01-01, 2024-12-31)\"))]\n ),\n ),\n ),\n ui.h6(\"submission_status_report.csv\"),\n ui.tags.ul(\n ui.p(\"The \", ui.strong(\"submission_status_report.csv\"), \" is used by SeqSender to record/link the samples submitted to each database. When SeqSender is linking accessions between NCBI databases, it will use this file to retrieve the recorded accessions and update the relevant submisison files.\"),\n ui.tags.ul(\n shiny_tools.file_output_column_info(column_name=\"bs-sample_name\",\n description=(\"Sample name used for submission to BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_status\",\n description=(\"Status of the sample submitted to BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_accession\",\n description=(\"Accession assigned to sample by BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_message\",\n description=(\"Message related to sample from BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra-sample_name\",\n description=(\"Sample name used for submission to SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_status\",\n description=(\"Status of the sample submitted to SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_accession\",\n description=(\"Accession assigned to sample by SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_message\",\n description=(\"Message related to sample from SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"gb-sample_name\",\n description=(\"Sample name used for submission to GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_status\",\n description=(\"Status of the sample submitted to GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_accession\",\n description=(\"Accession assigned to sample by GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_message\",\n description=(\"Message related to sample from GenBank.\"),\n controlled_fields=None,\n ),\n ),\n ),\n ui.hr(),\n ui.h4(\"BioSample Directory:\"),\n ui.hr(),\n ui.h6(\"metadata.tsv\"),\n ui.tags.ul(\n ui.p(\"BioSample submission metadata file. Can be used to submit your BioSample data to NCBI via their submission website instead of FTP.\"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by BioSample regarding the status of the current submission and sample information.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"BioSample submission xml file. Used by SeqSender to submit your BioSample data to NCBI via their FTP submission option.\"),\n ),\n ui.hr(),\n ui.h4(\"SRA Directory:\"),\n ui.hr(),\n ui.h6(\"metadata.tsv\"),\n ui.tags.ul(\n ui.p(\"SRA submission metadata file. Can be used to submit your SRA data to NCBI via their submission website instead of FTP.\"),\n ),\n ui.h6(\"raw_reads_location.txt\"),\n ui.tags.ul(\n ui.p(\"SeqSender file, used to record the location of all raw reads files to be uploaded to SRA via FTP.\"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by SRA regarding the status of the current submission and sample information.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"SRA submission xml file. Used by SeqSender to submit your SRA data to NCBI via FTP.\"),\n ),\n ui.hr(),\n ui.h4(\"GenBank Directory:\"),\n ui.hr(),\n ui.h6(\"AccessionReport.tsv\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. Contains the status of each sample and its corrsponding accession..\"),\n ),\n ui.h6(\"authorset.sbt\"),\n ui.tags.ul(\n ui.p(\"GenBank submission file for author/organization information.\"),\n ),\n ui.h6(\"comment.cmt\"),\n ui.tags.ul(\n ui.p(\"Optional tab-delimited, GenBank submission file. Contains additional sequencing and assembly information.\"),\n ),\n ui.h6(\"email.txt\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. This is a copy of the email sent by GenBank to every member of your group account after your GenBank sequences have been \", ui.strong(\"PROCESSED\"), \".\"),\n ),\n ui.h6(\"flatfile.txt\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. This is a copy of the annotated sample GenBank record, in GenBank flatfile format. This is how your sample looks like live on GenBank. \"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by GenBank regarding the status of the current submission.\"),\n ),\n ui.h6(\"seq-edit-report.html\"),\n ui.tags.ul(\n ui.p(\"Optional GenBank FTP output file. If your samples were automatically modified by GenBank during the submission process to adhere to GenBank standards then the changes to each sample will be listed here. This does not mean your sample failed to upload, this usually is to just a minor typo or incorrect syntax. If your config file field \", ui.code(\"GenBank_Auto_Remove_Failed_Samples\"), \" is set to \", ui.code(\"True\"), \" then the samples automatically removed by GenBank for failing to meet their submission criteria will also be listed here with the reason.\"),\n ),\n ui.h6(\"sequence.fsa\"),\n ui.tags.ul(\n ui.p(\"GenBank fasta file. Can be used to submit your data to GenBank via their website or it is used by SeqSender to upload via FTP or to create the tabl2asn sqn file.\"),\n ),\n ui.h6(\"source.src\"),\n ui.tags.ul(\n ui.p(\"GenBank metadata file. Can be used to submit your data to GenBank via their website or it is used by SeqSender to upload via FTP or to create the tabl2asn sqn file.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP submission xml file. Used to identify submission information and GenBank submission zip file.\"),\n ),\n ui.h6(\".zip\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP submission zip file. When submitting to GenBank via FTP, this contains all of your submission files: \", ui.strong(\"sequence.fsa\"), \", \", ui.strong(\"source.src\"), \", \", ui.strong(\"authorset.sbt\"), \", \", ui.strong(\"comment.cmt\"), \".\"),\n ),\n ui.h6(\".gff\"),\n ui.tags.ul(\n ui.p(\"Copy of gff file provided via command \", ui.code(\"--gff_file\"), \" when submitting via table2asn. It is used by SeqSender to create the table2asn sqn file.\"),\n ),\n]\n\n####################### COMMANDS PAGE ###################\n\ncommands_body = [\n ui.h2(\"SeqSender Commands\"),\n ui.p(\n \"This is a list of all available commands for seqsender, usage, and available options.\"\n ),\n ui.accordion(\n # Prep command\n shiny_tools.command_accordion_panel(\"prep\",\n description=\" command is used to generate all of the required files for submission to the databases specified. This command is not required for performing submissions, however, it is useful for visualizing your data before submission/troubleshooting submission issues.\"\n ),\n # Submit command\n shiny_tools.command_accordion_panel(\"submit\",\n description=\" command is used to generate all of the required files for submission to the databases specified. Then it performs batch upload to each database based on provided config file.\"\n ),\n # Submission status command\n shiny_tools.command_accordion_panel(\"submission_status\",\n description=\" command is used to update the progress of files submitted via the submit command. If database selection choices require submission in a sequential order then this command will also submit files when ready.\"\n ),\n # Load credentials command\n shiny_tools.command_accordion_panel(\"load_credentials\",\n description=\" command is used to load and encrypt your submission credentials into your submission config file. Provides a secret key to securely access your credentials for submission.\"\n ),\n # Test data command\n shiny_tools.command_accordion_panel(\"test_data\", description=\" command is used generate test data for seqsender, to be used for testing the prep and submit commands.\"),\n # Update biosample command\n shiny_tools.command_accordion_panel(\"update_biosample\", description=\" command is used to update biosample schema options based on available BioSample Packages.\"),\n # Update biosample command\n shiny_tools.command_accordion_panel(\"test_network_connection\", description=\" command is used to run a series of test network connections to troubleshoot submission issues.\"),\n # version command\n shiny_tools.command_accordion_panel(\"version\", description=\" command prints the current seqsender version.\"),\n ),\n]\n\n###################### FAQ PAGE ##########################\n\nfaq_body = [\n ui.h2(\"Frequently Asked Questions:\"),\n]\n\n######################## APP UI ##########################\n\napp_ui = ui.page_fluid(\n theme.lumen(),\n ui.head_content(ui.include_css(pathlib.Path(__file__).parent / \"seqsender.css\")),\n ui.page_navbar(\n ui.nav_panel(\"SeqSender\", index_body),\n ui.nav_panel(\"About\", about_body),\n ui.nav_panel(\"Installation\", installation_body),\n ui.nav_panel(\"Prerequisites\", prerequisites_body),\n ui.nav_panel(\"Submission Wizard\", setup_body),\n ui.nav_panel(\"My First Submission\", first_submission_body),\n ui.nav_panel(\"Output Files\", output_body),\n ui.nav_panel(\"Commands\", commands_body),\n # ui.nav_panel(\"FAQ\", faq_body),\n ui.nav_spacer(),\n ui.nav_control(ui.a(\"GitHub\", href=\"https://github.com/CDCgov/seqsender/\", target=\"_blank\")),\n selected=\"SeqSender\",\n header=header,\n footer=footer,\n ),\n)\n\n####################### SERVER #########################\nimport pathlib\n\ndir = pathlib.Path(__file__).parent\n\n@reactive.file_reader(dir / \"templates/config.seqsender.seqsender.schema_template.csv\")\ndef read_file():\n df = pd.read_csv(dir / \"templates/config.seqsender.seqsender.schema_template.csv\", index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n@reactive.file_reader(dir / \"templates/config.sra.sra.schema_template.csv\")\ndef read_sra_file():\n df = pd.read_csv(dir / \"templates/config.sra.sra.schema_template.csv\", index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n# Function to style metadata shiny index\ndef metadata_index_css(index):\n return \"background-color: #f0f0f0;\"\n\n# Function to style metadata shiny column headers\ndef metadata_database_css(column):\n if \"gb-\" in column:\n # Set color of GenBank table\n return \"background-color: #cce6ff;\"\n elif column.startswith(\"bs-\"):\n # Set color of BioSample table\n return \"background-color: #ffffb3;\"\n elif column.startswith(\"sra-\"):\n # Set color of SRA table\n return \"background-color: #ffcce6;\"\n else:\n return \"background-color: #dcdcdc;\"\n\n\ndef server(input, output, session):\n @reactive.Calc\n @reactive.file_reader(dir / \"templates/\")\n def read_biosample_file():\n df = pd.read_csv(dir / (\"templates/config.biosample.\" + input.BioSample_packages() + \"_template.csv\"), index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n @reactive.file_reader(dir / \"templates/\")\n def read_genbank_file():\n df = pd.read_csv(dir / \"templates/config.genbank.genbank.schema_template.csv\", index_col = \"column_name\")\n if input.GenBank_schemas() == \"FLU\":\n src_df = pd.read_csv(dir / \"templates/config.genbank.genbank.flu.src.schema_template.csv\", index_col = \"column_name\")\n else:\n src_df = pd.read_csv(dir / \"templates/config.genbank.genbank.src.schema_template.csv\", index_col = \"column_name\")\n cmt_df = pd.DataFrame({\n \"column_name\": [\"cmt-StructuredCommentPrefix\", \"cmt-StructuredCommentSuffix\", \"cmt-Assembly Method\"],\n \"required_column\": [\"Required\", \"Required\", \"Required\"],\n \"description\": [\"Structured comment keyword. ONLY REQUIRED IF INCLUDING COMMENT FILE. For FLU use 'FluData', HIV use 'HIV-DataBaseData', and for COV and other organisms use 'Assembly-Data'.\",\n \"Structured comment keyword. ONLY REQUIRED IF INCLUDING COMMENT FILE. For FLU use 'FluData', HIV use 'HIV-DataBaseData', and for COV and other organisms use 'Assembly-Data'.\",\n \"ONLY REQUIRED IF INCLUDING COMMENT FILE. Process used to assemble genome.\"]\n })\n cmt_df = cmt_df.set_index(\"column_name\")\n df = pd.concat([df, src_df, cmt_df])\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n @render.text\n def BioSample_Package_Name():\n return input.BioSample_packages()\n\n @reactive.effect\n @reactive.event(input.SRA_checkbox)\n def sra_submission_requires_biosample():\n if input.SRA_checkbox() == True and input.BioSample_checkbox() == False:\n with reactive.isolate():\n ui.update_checkbox(\"BioSample_checkbox\", value = True)\n\n @reactive.Calc\n def initialize_base_dataframe():\n return read_file()\n\n @reactive.Calc\n def initialize_biosample_dataframes():\n return read_biosample_file()\n\n @reactive.Calc\n def initialize_sra_dataframes():\n return read_sra_file()\n\n @reactive.Calc\n def initialize_genbank_dataframes():\n return read_genbank_file()\n\n @output\n @render.table\n @reactive.Calc\n def load_database_metadata_dataframe():\n database_df = initialize_base_dataframe()\n if input.GenBank_checkbox():\n genbank_df = initialize_genbank_dataframes()\n database_df = pd.concat([database_df, genbank_df], axis=1)\n if input.BioSample_checkbox():\n biosample_df = initialize_biosample_dataframes()\n database_df = pd.concat([database_df, biosample_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n if input.SRA_checkbox():\n sra_df = initialize_sra_dataframes()\n database_df = pd.concat([database_df, sra_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n database_df = database_df.loc[:, ~database_df.columns.duplicated()]\n database_df = (\n database_df.style.set_table_styles(\n [\n dict(\n selector=\"th\", props=[(\"border\", \"3px black solid !important\"), (\"white-space\", \"nowrap\"), (\"vertical-align\", \"top\")]\n ),\n dict(selector=\"ti\", props=[(\"background-color\", \"#DCDCDC\"), (\"vertical-align\", \"top\")]),\n dict(\n selector=\"td\", props=[(\"border\", \"1px black solid !important\"), (\"vertical-align\", \"top\")]\n ),\n ]\n )\n .applymap_index(metadata_database_css, axis=\"columns\")\n .applymap_index(metadata_index_css, axis=\"index\")\n )\n return database_df\n\n @reactive.Calc\n @render.download(filename=\"seqsender_config.yaml\")\n def download_config():\n config_file = initialize_config()\n yield yaml.safe_dump(config_file, sort_keys=False).replace(r\"''\", '')\n\n @reactive.Calc\n def initialize_config():\n config_file = {\"Submission\": {\n **({\"NCBI\":{\n \"Username\": input.ncbi_config_username() or \"\",\n \"Password\": \"\",\n \"Spuid_Namespace\": input.ncbi_config_spuid_namespace() or \"\",\n **({\"BioSample_Package\": input.BioSample_packages() or \"\"} if input.BioSample_checkbox() else {}),\n **({\"GenBank_Auto_Remove_Failed_Samples\": input.ncbi_config_auto_remove_genbank() or \"\"} if input.GenBank_checkbox() else {}),\n \"Publication_Title\": input.ncbi_config_publication_title() or \"\",\n \"Publication_Status\": input.ncbi_config_publication_status() or \"\",\n \"Specified_Release_Date\": input.ncbi_config_release_date() or \"\",\n \"Link_Sample_Between_NCBI_Databases\": input.ncbi_config_link_samples() or \"\",\n \"Add_Definition_Line_Accessions\": input.ncbi_config_fasta_def_lines() or \"\",\n \"Description\": {\n \"Organization\": {\n \"Role\": input.ncbi_config_role() or \"\",\n \"Type\": input.ncbi_config_type() or \"\",\n \"Name\": input.ncbi_config_org_name() or \"\",\n \"Address\": {\n \"Affil\": input.ncbi_config_affil() or \"\",\n \"Div\": input.ncbi_config_div() or \"\",\n \"Street\": input.ncbi_config_street() or \"\",\n \"City\": input.ncbi_config_city() or \"\",\n \"Sub\": input.ncbi_config_state() or \"\",\n \"Postal_Code\": input.ncbi_config_postal() or \"\",\n \"Country\": input.ncbi_config_country() or \"\",\n \"Email\": input.ncbi_config_email() or \"\",\n \"Phone\": input.ncbi_config_phone() or \"\",\n \"Submitter\": {\n \"Email\": input.ncbi_sub_email_one() or \"\",\n \"Alt_Email\": input.ncbi_sub_email_two() or \"\",\n \"Name\": {\n \"First\": input.ncbi_config_first_name() or \"\",\n \"Last\": input.ncbi_config_last_name() or \"\",\n }\n }\n }\n }\n }\n }} if input.BioSample_checkbox() or input.SRA_checkbox() or input.GenBank_checkbox() else {})\n }\n }\n config_file = {key: (None if value == \"\" else value) for key, value in config_file.items()}\n return config_file\n\n @reactive.Calc\n @render.download(filename=\"metadata_template.csv\")\n def download_metadata():\n database_df = initialize_base_dataframe()\n if input.GenBank_checkbox():\n genbank_df = initialize_genbank_dataframes()\n database_df = pd.concat([database_df, genbank_df], axis=1)\n if input.BioSample_checkbox():\n biosample_df = initialize_biosample_dataframes()\n database_df = pd.concat([database_df, biosample_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n if input.SRA_checkbox():\n sra_df = initialize_sra_dataframes()\n database_df = pd.concat([database_df, sra_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n database_df = database_df.loc[:,~database_df.columns.duplicated()].copy()\n yield database_df.to_csv()\n\n\napp = App(app_ui, server)\n", "type": "text"}, {"name": "about.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\n\nabout_body = [\n ui.h2(\"About\"),\n ui.hr(),\n ui.p(\"SeqSender is a \", ui.strong(\"Python\"), \" program developed to aid the process of submitting genomic samples to public repositories. \",\n \"SeqSender \", ui.strong(\"simplifies\"), \" the submission process by creating all the necessary submission files for multiple databases from a single metadata file and fasta file. \",\n \"Based on the organism and database selection, SeqSender also \", ui.strong(\"validates\"), \" that the metadata your submitting meets the requirements of the database to preemptively catch submission errors. \",\n \"The tool can also be used to \", ui.strong(\"submit\"), \" your samples to each database while also linking the samples between the databases. \"),\n ui.p(\"SeqSender currently supports the databases from NCBI: \", ui.strong(\"BioSample, \"), ui.strong(\"SRA, \"),\n \" and \", ui.strong(\"GenBank \"), \".\"),\n ui.h2(\"Available Databases\"),\n ui.hr(),\n ui.h4(\"NCBI (National Center for Biotechnology Information)\"),\n ui.a(ui.h6(\"BioProject\"), href=\"https://www.ncbi.nlm.nih.gov/bioproject/\"),\n ui.tags.ul(\n ui.p(\"Is a collection of biological data that is tied to a research project. \",\n \"Used to collate your genomic sample data together across multiple databases. \",\n \"A BioProject provides a centralized location to identify/connect/share/describe the samples you are submitting to NCBI. \",\n \"A BioProject is \", ui.strong(\"required\"), \" if you're submitting to certain NCBI databases: \", ui.strong(\"Sequence Read Archive (SRA), Whole Genome Shotgun (WGS), \"), \"and \", ui.strong(\"Transcriptome Shotgun Assembly (TSA)\"), \".\",\n ),\n ),\n ui.a(ui.h6(\"Sequence Read Archive (SRA)\"), href=\"https://www.ncbi.nlm.nih.gov/sra\"),\n ui.tags.ul(\n ui.p(\"Is a database of high-throughput raw sequencing data and alignment information. \",\n \"The purpose of the database is to support reproducibility to faciliate new discoveries through data analysis. \",\n \"The SRA database is part of the \", ui.strong(\"International Nucleotide Sequence Database Collaboration (INSDC)\"), \", which is a joint effort between SRA, European Bioinformatics Institute (EBI), and the DNA Database of Japan (DDBJ) where data submitted to one is shared among them all. \",\n \"The database accepts submissions for all organisms, metagenomic, clinical studies, and environmental surveys. \",\n \"If your data contains human subjects/metagenomes, you should determine if your data is appropriate for public release, if not you might consider the NIH controlled access via dbGaP (the database of Genotypes and Phenotypes) instead. \",\n ),\n ui.p(\"SeqSender provides two options for uploading data to SRA, supports multiple files per sample, and supports all of the file type options that SRA supports which includes: BAM, SFF, HDF5, and FASTQ. \",\n \"Its easy to add your raw reads files when using SeqSender; using the metadata file in your SeqSender submission, just add the filepath('s) for each sample. \",\n \"For more SeqSender information, refer to the tab: \", ui.strong(\"My First Submission\"), \", to learn more about the SRA submission options or to the tab: \", ui.strong(\"Setup Wizard\"), \", to learn about the requirements for submitting to SRA. \",\n ),\n ),\n ui.a(ui.h6(\"BioSample\"), href=\"https://www.ncbi.nlm.nih.gov/biosample/\"),\n ui.tags.ul(\n ui.p(\"Is a database for storing descriptive information/metadata about biological samples you are submitting to other NCBI databases. \",\n \"BioSample provides broad categories for sample/study types called \", ui.a(ui.strong(\"Packages\"), href=\"https://www.ncbi.nlm.nih.gov/biosample/docs/packages/\"), \" which determine the metadata submission criteria. \",\n \"Including a BioSample submission with your data is a good way to provide revelant information regarding the individual location/organism your sample was collected from. \"\n ),\n ui.p(\"SeqSender supports and validates metadata for all current BioSample Packages. \",\n \"Place the chosen BioSample Package name inside your config file. \",\n \"For more information refer to the tab \", ui.strong(\"Setup Wizard\"), \", to select the available BioSample Packages and to get the subsequent required metadata. \",\n ),\n ),\n ui.a(ui.h6(\"GenBank\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/\"),\n ui.tags.ul(\n ui.p(\"Is a database for storing assembled nucleotide sequences and annotations. \",\n \"Each sample submitted will be annotated to include gene structure, coding regions, and other function elements related to your specimen. \",\n \"Samples uploaded to GenBank are also subject to meeting specific data integrity and quality requirements before they are accepted to GenBank. \",\n ),\n ui.p(\"SeqSender offers two methods for submitting data to GenBank. \",\n \"For Influenza Virus and COVID-19, SeqSender can upload your data via FTP, check submission status, and retrieve your GenBank accessions. \",\n \"For all other viruses, GenBank submissions will be made using \", ui.a(ui.strong(\"table2asn\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/table2asn/\"), \". \",\n \"The submission can then be manually uploaded to GenBank via NCBI's \", ui.a(ui.strong(\"submission portal\"), href=\"https://submit.ncbi.nlm.nih.gov/\"), \" or it can automatically email the submission to GenBank and CC you on it.\"\n ),\n ),\n]\n", "type": "text"}, {"name": "index.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n################## INDEX PAGE #######################\nindex_body = [\n ui.HTML(\n \"\"\"\n

Overview

\n

seqsender is a Python program that is developed to automate the process of generating necessary submission files and batch uploading them to NCBI archives (such as BioSample, SRA, and Genbank).

\n

Public Domain Standard Notice

\n

This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC \u00a7 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.

\n

License Standard Notice

\n

The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.

\n

This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.

\n

This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.

\n

You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html

\n

The source code forked from other open source projects will inherit its license.

\n

Privacy Standard Notice\n

\n

This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC\u2019s privacy policy, please visit http://www.cdc.gov/other/privacy.html.

\n

Contributing Standard Notice\n

\n

Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.

\n

All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.

\n

Records Management Standard Notice\n

\n

This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.

\n

Additional Standard Notices\n

\n

Please refer to CDC\u2019s Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.

\n\"\"\"\n ),\n]\n", "type": "text"}, {"name": "my_first_submission.py", "content": "from shiny import App, render, ui\n\ntest_data = [\n ui.h4(\"Generate test data for usage with SeqSender\"),\n ui.p(\"Test data for each database can be generated for multiple available organisms. \",\n \"To generate test data, use the \", ui.code(ui.strong(\"test_data\")), \" command. \"\n ),\n ui.p(\"Based on the selected \", ui.code(ui.strong(\"databases\")), \" and \", ui.code(ui.strong(\"organism\")),\n \", the applicable config file, raw reads, assembled fasta, and metadata will be generated at the specified \", ui.code(ui.strong(\"submission_dir\")), \". \",\n\n ),\n]\n\nseqsender_requirements = [\n ui.h4(\"Config File\"),\n ui.p(\"SeqSender uses a config file to simplify, keep consistent, and automate the submission file creation/upload. \",\n \"Fields required in your config file can change based on your database and organism selection. \",\n \"Use the tab: \", ui.strong(\"Submission Wizard\"), \" to generate a config file based on your database selection. \",\n ),\n ui.h4(\"Metadata Specific Fields\"),\n ui.p(\"SeqSender has specific required fields depending on which database you submit to that must be present in your metadata. \",\n \"All fields below are required unless specified otherwise and will be used repeatedly for when submitting to multiple databases. \"\n ),\n ui.tags.ul(\n ui.tags.li(ui.strong(\"sequence_name\")),\n ui.tags.ul(\n ui.p(\"Required for when submitting to \", ui.strong(\"GenBank\"), \". \",\n \"This field should contain the sequence header name of the fasta file you are using with SeqSender. \",\n ),\n ui.p(\"SeqSender will use this to join your metadata with your fasta file. \",\n \"This is to create the corresponding fasta file's for submission to GenBank with their updated submission name based on the name used for \", ui.code(ui.strong(\"gb-sample_name\")), \". \",\n ),\n ),\n ui.tags.li(ui.strong(\"organism\")),\n ui.tags.ul(\n ui.p(\"This should be the full name of the organism for the sample. \",\n \"Be sure that you have correctly spelled the full name of your organism to prevent submission issues. \",\n ),\n ),\n ui.tags.li(ui.strong(\"authors\")),\n ui.tags.ul(\n ui.p(\"This should be a one line, list of names associated to the sample you are submitting.\",\n \"The names should be structured in the format of \", ui.code(ui.strong(\" \")), \" with each name separated by a semi-colon. Middle names can be excluded. \",\n \"Your list of names should look something like this: \",\n ),\n ui.code(ui.strong(\"John Doe; Jane Doe; John Quincy Adams; Franklin Delano Roosevelt\")),\n ui.p(ui.strong(\"Note: \"), \"SeqSender uses a natural language processing library to sort names into first, middle, and last. \",\n \"While SeqSender does handle international and hyphenated names fairly well, it can still have issues correctly identifying every name's structure. \",\n \"If you find this is an issue for your name, try either removing/initializing your middle name or by removing the hypen from your name if present. \",\n ),\n ),\n ui.tags.li(ui.strong(\"collection_date\")),\n ui.tags.ul(\n ui.p(\"This should be an ISO-8601 formatted collection date for your sample. \",\n \"The format's accepted are: \", ui.code(ui.strong(\"YYYY-MM-DD\")), \", \", ui.code(ui.strong(\"YYYY-MM\")), \", or \", ui.code(ui.strong(\"YYYY\")), \". \",\n \"Time should not be included as it could create issues during submission. \"\n ),\n ),\n ui.tags.li(ui.strong(\"bioproject\")),\n ui.tags.ul(\n ui.p(\"This field is required when submitting to SRA or BioSample but is recommended to be used for all NCBI database submissions. \"\n \"Visit the \", ui.a(ui.strong(\"BioProject Web Portal\"), href=\"https://submit.ncbi.nlm.nih.gov/subs/bioproject/\"), \" to create a BioProject for your samples. \",\n ),\n ui.p(\"To add your BioProject to your metadata, all you need is the accession ID \", ui.code(ui.strong(\"(PRJNAxxxxxx, i.e. PRJNA123456)\")), \" created once you complete the BioProject.\"),\n ),\n ),\n]\n\nsra_database_submission = [\n ui.h4(\"Raw Reads Locations\"),\n ui.p(\"The raw reads for your samples can be stored in a variety of different locations and still be used in submission with SeqSender. \",\n \"Raw reads can either be stored locally or in the cloud when uploading to SRA, as well as, multiple files can be associated to one sample. \",\n \"The metadata column \", ui.code(ui.strong(\"sra-file_#\")), \", can be repeated where # is the numeric value of that file. \",\n \"(i.e. If you were uploading two files, you would have the first file path in \", ui.code(\"sra-file_1\"), \" and the second file path in \", ui.code(\"sra-file_2\"), \".)\"\n ),\n ui.p(\"If your raw reads are stored in the cloud you will want to include the full URL path to the file for the metadata column. \",\n \"To signify to SeqSender that this is a cloud URL, in the metadata column \", ui.code(ui.strong(\"sra-file_location\")), \", the keyword \", ui.code(ui.strong(\"cloud\")), \" should be included. \",\n ),\n ui.p(\"If your raw reads are locally stored locally they can be located in two locations to be accessed by SeqSender. \",\n \"If just the file name is included in your metadata column, then your raw reads should be stored in a folder named \", ui.code(ui.strong(\"raw_reads\")), \" at the location of your \", ui.code(ui.strong(\"--submission_dir\")), \" when using SeqSender. \",\n \"Otherwise, the full file path can be included in your submission. (\", ui.strong(\"Note: \"), \"Be sure if using docker/singularity that SeqSender has access to the location of your raw reads to prevent submission errors. \",\n \"For local files, the metadata column \", ui.code(ui.strong(\"sra-file_location\")), \" should use the keyword \", ui.code(ui.strong(\"local\")), \" to signify that the file is stored locally. \",\n ),\n ui.h4(\"Raw Reads Processing Error\"),\n ui.p(\"If your raw reads fail to process on SRA and it could be because they are incorrectly formatted for SRA. \",\n \"If the SRA team notifies you of this and recommends adding a \", ui.strong(\"sra loader\"), \" to correct the problem, that can be easily added to SeqSender. \",\n \"Using the metadata column\", ui.code(ui.strong(\"sra-loader\")), \" add the name of the specified loader by the SRA team to correct this issue. \",\n ),\n ui.h4(\"Metadata Fields\"),\n ui.p(\"For all required fields for SeqSender to submit data to SRA, refer to the tab: \", ui.strong(\"Submission Wizard\"), \". \",\n \"For all other optional fields, refer to NCBI's \", ui.a(ui.strong(\"SRA portal\"), href=\"https://www.ncbi.nlm.nih.gov/sra/docs/submitportal/\"), \", any metadata field can be easily added by using the specified column name with the prefix \", ui.code(\"sra-\"), \". \",\n ),\n]\n\nbiosample_database_submission = [\n ui.h4(\"Metadata Fields\"),\n ui.p(\"Required metadata columns change based on the specified \", ui.a(ui.strong(\"BioSample Package\"), href=\"\"), \" used in your submission. \",\n \"Refer to the tab: \", ui.strong(\"Submission Wizard\"), \" to get all the required metadata columns for your chosen package. \",\n \"If you want to add a supported column that is not present in the submission wizard, you can easily add it to your metadata using the specified column name with the prefix \", ui.code(\"bs-\"), \". \",\n ),\n]\n\nfirst_submission_body = [\n ui.h2(\"My First Submission\"),\n ui.hr(),\n ui.navset_pill_list(\n ui.nav_panel(\"Generate Test Data\", test_data),\n ui.nav_panel(\"SeqSender Requirements\", seqsender_requirements),\n ui.nav_menu(\"Database Specific Requirements\",\n ui.nav_panel(\"SRA\", sra_database_submission),\n ui.nav_panel(\"BioSample\", biosample_database_submission),\n ),\n id=\"tab\",\n ),\n]\n", "type": "text"}, {"name": "prerequisites.py", "content": "from shiny import App, render, ui\n\nncbi_prereq = [\n ui.h4(\"NCBI Submissions:\"),\n ui.p(\"SeqSender utilizes a UI-Less Data Submission Protocol to bulk upload submission files to NCBI databases. SeqSender also uses \", ui.a(ui.strong(\"table2asn\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/table2asn/\"), \", to upload GenBank submissions for organisms other than Influenza and COVID-19, by emailing it to NCBI via a Simple Mail Transfer Protocol (SMTP). \",\n \"To begin submitting to NCBI with SeqSender, you must: \",\n ),\n ui.tags.ul(\n ui.tags.li(\"Have a \", ui.a(ui.strong(\"NCBI account\"), href=\"https://account.ncbi.nlm.nih.gov/\"), \". Sign up or login in to continue. \"),\n ui.p(\"To generate the files for submitting data to NCBI via their \", ui.a(ui.strong(\"submission portal\"), href = \"https://submit.ncbi.nlm.nih.gov/\"), \" or if you're only submitting data via table2asn, no extra steps must be taken. Use the tab: \", ui.strong(\"Submission Wizard\"), \" to get the required metadata columns for the database you're uploading to. \",\n \"If you're wanting SeqSender to handle uploading your samples for you, then follow the next steps: \",\n ),\n ui.tags.li(\"Contact NCBI at: \", ui.code(ui.strong(\"gb-admin@ncbi.nlm.nih.gov\")), \" to create your institution/group/lab's UI-less submission account. This will create an account for your institution/group/lab's and allow you to specify NCBI users of your institution/group/lab's access to the uploads via NCBI's \", ui.a(ui.strong(\"web portal\"), href=\"https://submit.ncbi.nlm.nih.gov/subs/\"), \". Make sure to answer the following questions below when contacting NCBI: \"),\n ui.tags.ul(\n ui.tags.li(ui.strong(\"MyNCBI account email of the primary submitter\")),\n ui.tags.li(ui.strong(\"center/account abbreviation\")),\n ui.tags.li(ui.strong(\"full center/account name\")),\n ui.tags.li(ui.strong(\"names and email addresses of all additional users\")),\n ui.tags.li(ui.strong(\"postal address of institute (including postal code and country)\")),\n ),\n ui.tags.li(\"Once created, the UI-less submission account credentials and spuid_namespace can be added to your config file to begin submitting your samples to NCBI. Be sure to use the SeqSender submission flag \", ui.code(ui.strong(\"--test\")), \" to perform an initial test submission to NCBI, to ensure everything is setup correctly. \"),\n )\n]\nprerequisites_body = [\n ui.h2(\"Prerequisites\"),\n ui.navset_tab(\n ui.nav_panel(\"NCBI\", ncbi_prereq),\n id=\"prerequisites_tab\",\n ),\n]\n", "type": "text"}, {"name": "seqsender.css", "content": ".custom_sidebar, .accordion-title, h1, h2, h3, h4, h5, h6 {\n font-weight: 600;\n background-image: radial-gradient(circle, #023382, #0359e2);\n color: transparent;\n background-clip: text;\n -webkit-background-clip: text;\n}\nhr {\n border: 2px solid black;\n}\n.custom_header {\n border-bottom: 2px solid DimGray;\n padding-bottom: 2px;\n}\n.custom_sidebar {\n text-decoration: none;\n font-size: large;\n padding: 5px;\n}\n.terminal_css {}\n", "type": "text"}, {"name": "seqsender_config.yaml", "content": "Submission:\n NCBI:\n Password: mypassword\n Username: myusername\n", "type": "text"}, {"name": "setup.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\nimport shiny_tools\n####################### SETUP PAGE ###############################\nyaml_css = \"background-color: #F0F0F0;white-space: nowrap; font-size: 20px ;margin-top:-15px;font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;-webkit-user-select: none; -ms-user-select: none; user-select: none;\"\n\ndef config_indent(tabs, string, custom_style = \"display:inline-block;\"):\n return div(ui.HTML((\" | \" * tabs) + string), style=custom_style)\n\ndef config_text_input(id, placeholder, help_msg, custom_style = \"display:inline-block;height:5px;\"):\n return div(ui.tooltip(ui.input_text(id, label=None, placeholder=placeholder), help_msg, id=(id + \"_tooltip\")), style=custom_style)\n\nsetup_body = [\n ui.h2(\"Setup\"),\n ui.layout_columns(\n ui.card(\n ui.card_header(\n ui.h4(\"Select Database:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(\n id = \"db_select_tooltip\",\n description = \"Select all databases you plan to submit your data to. The databases you plan to submit to will change the requirements for the config and metadata file.\",\n position=\"right\",\n ),\n ),\n ui.input_checkbox(\"BioSample_checkbox\", \"BioSample\", width=None),\n ui.tooltip(ui.input_checkbox(\"SRA_checkbox\", \"SRA\", width=None),\n \"When submitting to SRA, a BioSample submission is also required.\",\n style=\"display:inline-block;float:right;\"),\n ui.input_checkbox(\"GenBank_checkbox\", \"GenBank\", width=None),\n ),\n ui.card(\n ui.card_header(\n ui.h3(\"Database Options:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(id = \"db_option_tooltip\",\n description = \"Select database dependent options. This changes metadata requirements based on database submission criteria.\",\n position = \"right\",\n ),\n ),\n # If BioSample checkbox checked then load BioSample Package Options\n ui.panel_conditional(\n \"input.BioSample_checkbox\",\n ui.input_select(\n \"BioSample_packages\",\n label=\"Select BioSample Package:\",\n choices={\"STANDARD\": {\"SARS-CoV-2.cl.1.0\":\"SARS-CoV-2.cl.1.0\",\"SARS-CoV-2.wwsurv.1.0\":\"SARS-CoV-2.wwsurv.1.0\",\"Virus.1.0\":\"Virus.1.0\",\"Beta-lactamase.1.0\":\"Beta-lactamase.1.0\",\"Human.1.0\":\"Human.1.0\",\"Invertebrate.1.0\":\"Invertebrate.1.0\",\"Metagenome.environmental.1.0\":\"Metagenome.environmental.1.0\",\"Microbe.1.0\":\"Microbe.1.0\",\"Model.organism.animal.1.0\":\"Model.organism.animal.1.0\",\"OneHealthEnteric.1.0\":\"OneHealthEnteric.1.0\",\"Plant.1.0\":\"Plant.1.0\"},\n \"PATHOGEN\": {\"Pathogen.cl.1.0\":\"Pathogen.cl.1.0\",\"Pathogen.env.1.0\":\"Pathogen.env.1.0\"},\n \"MIGS.ba\": {\"MIGS.ba.6.0\":\"MIGS.ba.6.0\",\"MIGS.ba.agriculture.6.0\":\"MIGS.ba.agriculture.6.0\",\"MIGS.ba.air.6.0\":\"MIGS.ba.air.6.0\",\"MIGS.ba.built.6.0\":\"MIGS.ba.built.6.0\",\"MIGS.ba.food-animal.6.0\":\"MIGS.ba.food-animal.6.0\",\"MIGS.ba.food-farm.env.6.0\":\"MIGS.ba.food-farm.env.6.0\",\"MIGS.ba.food-human.foods.6.0\":\"MIGS.ba.food-human.foods.6.0\",\"MIGS.ba.food-prod.facility.6.0\":\"MIGS.ba.food-prod.facility.6.0\",\"MIGS.ba.host-associated.6.0\":\"MIGS.ba.host-associated.6.0\",\"MIGS.ba.human-associated.6.0\":\"MIGS.ba.human-associated.6.0\",\"MIGS.ba.human-gut.6.0\":\"MIGS.ba.human-gut.6.0\",\"MIGS.ba.human-oral.6.0\":\"MIGS.ba.human-oral.6.0\",\"MIGS.ba.human-skin.6.0\":\"MIGS.ba.human-skin.6.0\",\"MIGS.ba.human-vaginal.6.0\":\"MIGS.ba.human-vaginal.6.0\",\"MIGS.ba.hydrocarbon-cores.6.0\":\"MIGS.ba.hydrocarbon-cores.6.0\",\"MIGS.ba.hydrocarbon-fluids.swabs.6.0\":\"MIGS.ba.hydrocarbon-fluids.swabs.6.0\",\"MIGS.ba.microbial.6.0\":\"MIGS.ba.microbial.6.0\",\"MIGS.ba.miscellaneous.6.0\":\"MIGS.ba.miscellaneous.6.0\",\"MIGS.ba.plant-associated.6.0\":\"MIGS.ba.plant-associated.6.0\",\"MIGS.ba.sediment.6.0\":\"MIGS.ba.sediment.6.0\",\"MIGS.ba.soil.6.0\":\"MIGS.ba.soil.6.0\",\"MIGS.ba.symbiont-associated.6.0\":\"MIGS.ba.symbiont-associated.6.0\",\"MIGS.ba.wastewater.6.0\":\"MIGS.ba.wastewater.6.0\",\"MIGS.ba.water.6.0\":\"MIGS.ba.water.6.0\"},\n \"MIGS.eu\": {\"MIGS.eu.6.0\":\"MIGS.eu.6.0\",\"MIGS.eu.agriculture.6.0\":\"MIGS.eu.agriculture.6.0\",\"MIGS.eu.air.6.0\":\"MIGS.eu.air.6.0\",\"MIGS.eu.built.6.0\":\"MIGS.eu.built.6.0\",\"MIGS.eu.food-animal.6.0\":\"MIGS.eu.food-animal.6.0\",\"MIGS.eu.food-farm.env.6.0\":\"MIGS.eu.food-farm.env.6.0\",\"MIGS.eu.food-human.foods.6.0\":\"MIGS.eu.food-human.foods.6.0\",\"MIGS.eu.food-prod.facility.6.0\":\"MIGS.eu.food-prod.facility.6.0\",\"MIGS.eu.host-associated.6.0\":\"MIGS.eu.host-associated.6.0\",\"MIGS.eu.human-associated.6.0\":\"MIGS.eu.human-associated.6.0\",\"MIGS.eu.human-gut.6.0\":\"MIGS.eu.human-gut.6.0\",\"MIGS.eu.human-oral.6.0\":\"MIGS.eu.human-oral.6.0\",\"MIGS.eu.human-skin.6.0\":\"MIGS.eu.human-skin.6.0\",\"MIGS.eu.human-vaginal.6.0\":\"MIGS.eu.human-vaginal.6.0\",\"MIGS.eu.hydrocarbon-cores.6.0\":\"MIGS.eu.hydrocarbon-cores.6.0\",\"MIGS.eu.hydrocarbon-fluids.swabs.6.0\":\"MIGS.eu.hydrocarbon-fluids.swabs.6.0\",\"MIGS.eu.microbial.6.0\":\"MIGS.eu.microbial.6.0\",\"MIGS.eu.miscellaneous.6.0\":\"MIGS.eu.miscellaneous.6.0\",\"MIGS.eu.plant-associated.6.0\":\"MIGS.eu.plant-associated.6.0\",\"MIGS.eu.sediment.6.0\":\"MIGS.eu.sediment.6.0\",\"MIGS.eu.soil.6.0\":\"MIGS.eu.soil.6.0\",\"MIGS.eu.symbiont-associated.6.0\":\"MIGS.eu.symbiont-associated.6.0\",\"MIGS.eu.wastewater.6.0\":\"MIGS.eu.wastewater.6.0\",\"MIGS.eu.water.6.0\":\"MIGS.eu.water.6.0\"},\n \"MIGS.vi\": {\"MIGS.vi.6.0\":\"MIGS.vi.6.0\",\"MIGS.vi.agriculture.6.0\":\"MIGS.vi.agriculture.6.0\",\"MIGS.vi.air.6.0\":\"MIGS.vi.air.6.0\",\"MIGS.vi.built.6.0\":\"MIGS.vi.built.6.0\",\"MIGS.vi.food-animal.6.0\":\"MIGS.vi.food-animal.6.0\",\"MIGS.vi.food-farm.env.6.0\":\"MIGS.vi.food-farm.env.6.0\",\"MIGS.vi.food-human.foods.6.0\":\"MIGS.vi.food-human.foods.6.0\",\"MIGS.vi.food-prod.facility.6.0\":\"MIGS.vi.food-prod.facility.6.0\",\"MIGS.vi.host-associated.6.0\":\"MIGS.vi.host-associated.6.0\",\"MIGS.vi.human-associated.6.0\":\"MIGS.vi.human-associated.6.0\",\"MIGS.vi.human-gut.6.0\":\"MIGS.vi.human-gut.6.0\",\"MIGS.vi.human-oral.6.0\":\"MIGS.vi.human-oral.6.0\",\"MIGS.vi.human-skin.6.0\":\"MIGS.vi.human-skin.6.0\",\"MIGS.vi.human-vaginal.6.0\":\"MIGS.vi.human-vaginal.6.0\",\"MIGS.vi.hydrocarbon-cores.6.0\":\"MIGS.vi.hydrocarbon-cores.6.0\",\"MIGS.vi.hydrocarbon-fluids.swabs.6.0\":\"MIGS.vi.hydrocarbon-fluids.swabs.6.0\",\"MIGS.vi.microbial.6.0\":\"MIGS.vi.microbial.6.0\",\"MIGS.vi.miscellaneous.6.0\":\"MIGS.vi.miscellaneous.6.0\",\"MIGS.vi.plant-associated.6.0\":\"MIGS.vi.plant-associated.6.0\",\"MIGS.vi.sediment.6.0\":\"MIGS.vi.sediment.6.0\",\"MIGS.vi.soil.6.0\":\"MIGS.vi.soil.6.0\",\"MIGS.vi.symbiont-associated.6.0\":\"MIGS.vi.symbiont-associated.6.0\",\"MIGS.vi.wastewater.6.0\":\"MIGS.vi.wastewater.6.0\",\"MIGS.vi.water.6.0\":\"MIGS.vi.water.6.0\"},\n \"MIMAG\": {\"MIMAG.6.0\":\"MIMAG.6.0\",\"MIMAG.agriculture.6.0\":\"MIMAG.agriculture.6.0\",\"MIMAG.air.6.0\":\"MIMAG.air.6.0\",\"MIMAG.built.6.0\":\"MIMAG.built.6.0\",\"MIMAG.food-animal.6.0\":\"MIMAG.food-animal.6.0\",\"MIMAG.food-farm.env.6.0\":\"MIMAG.food-farm.env.6.0\",\"MIMAG.food-human.foods.6.0\":\"MIMAG.food-human.foods.6.0\",\"MIMAG.food-prod.facility.6.0\":\"MIMAG.food-prod.facility.6.0\",\"MIMAG.host-associated.6.0\":\"MIMAG.host-associated.6.0\",\"MIMAG.human-associated.6.0\":\"MIMAG.human-associated.6.0\",\"MIMAG.human-gut.6.0\":\"MIMAG.human-gut.6.0\",\"MIMAG.human-oral.6.0\":\"MIMAG.human-oral.6.0\",\"MIMAG.human-skin.6.0\":\"MIMAG.human-skin.6.0\",\"MIMAG.human-vaginal.6.0\":\"MIMAG.human-vaginal.6.0\",\"MIMAG.hydrocarbon-cores.6.0\":\"MIMAG.hydrocarbon-cores.6.0\",\"MIMAG.hydrocarbon-fluids.swabs.6.0\":\"MIMAG.hydrocarbon-fluids.swabs.6.0\",\"MIMAG.microbial.6.0\":\"MIMAG.microbial.6.0\",\"MIMAG.miscellaneous.6.0\":\"MIMAG.miscellaneous.6.0\",\"MIMAG.plant-associated.6.0\":\"MIMAG.plant-associated.6.0\",\"MIMAG.sediment.6.0\":\"MIMAG.sediment.6.0\",\"MIMAG.soil.6.0\":\"MIMAG.soil.6.0\",\"MIMAG.symbiont-associated.6.0\":\"MIMAG.symbiont-associated.6.0\",\"MIMAG.wastewater.6.0\":\"MIMAG.wastewater.6.0\",\"MIMAG.water.6.0\":\"MIMAG.water.6.0\"},\n \"MIMARKS.specimen\": {\"MIMARKS.specimen.6.0\":\"MIMARKS.specimen.6.0\",\"MIMARKS.specimen.agriculture.6.0\":\"MIMARKS.specimen.agriculture.6.0\",\"MIMARKS.specimen.air.6.0\":\"MIMARKS.specimen.air.6.0\",\"MIMARKS.specimen.built.6.0\":\"MIMARKS.specimen.built.6.0\",\"MIMARKS.specimen.food-animal.6.0\":\"MIMARKS.specimen.food-animal.6.0\",\"MIMARKS.specimen.food-farm.env.6.0\":\"MIMARKS.specimen.food-farm.env.6.0\",\"MIMARKS.specimen.food-human.foods.6.0\":\"MIMARKS.specimen.food-human.foods.6.0\",\"MIMARKS.specimen.food-prod.facility.6.0\":\"MIMARKS.specimen.food-prod.facility.6.0\",\"MIMARKS.specimen.host-associated.6.0\":\"MIMARKS.specimen.host-associated.6.0\",\"MIMARKS.specimen.human-associated.6.0\":\"MIMARKS.specimen.human-associated.6.0\",\"MIMARKS.specimen.human-gut.6.0\":\"MIMARKS.specimen.human-gut.6.0\",\"MIMARKS.specimen.human-oral.6.0\":\"MIMARKS.specimen.human-oral.6.0\",\"MIMARKS.specimen.human-skin.6.0\":\"MIMARKS.specimen.human-skin.6.0\",\"MIMARKS.specimen.human-vaginal.6.0\":\"MIMARKS.specimen.human-vaginal.6.0\",\"MIMARKS.specimen.hydrocarbon-cores.6.0\":\"MIMARKS.specimen.hydrocarbon-cores.6.0\",\"MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0\":\"MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0\",\"MIMARKS.specimen.microbial.6.0\":\"MIMARKS.specimen.microbial.6.0\",\"MIMARKS.specimen.miscellaneous.6.0\":\"MIMARKS.specimen.miscellaneous.6.0\",\"MIMARKS.specimen.plant-associated.6.0\":\"MIMARKS.specimen.plant-associated.6.0\",\"MIMARKS.specimen.sediment.6.0\":\"MIMARKS.specimen.sediment.6.0\",\"MIMARKS.specimen.soil.6.0\":\"MIMARKS.specimen.soil.6.0\",\"MIMARKS.specimen.symbiont-associated.6.0\":\"MIMARKS.specimen.symbiont-associated.6.0\",\"MIMARKS.specimen.wastewater.6.0\":\"MIMARKS.specimen.wastewater.6.0\",\"MIMARKS.specimen.water.6.0\":\"MIMARKS.specimen.water.6.0\"},\n \"MIMARKS.survey\": {\"MIMARKS.survey.agriculture.6.0\":\"MIMARKS.survey.agriculture.6.0\",\"MIMARKS.survey.air.6.0\":\"MIMARKS.survey.air.6.0\",\"MIMARKS.survey.built.6.0\":\"MIMARKS.survey.built.6.0\",\"MIMARKS.survey.food-animal.6.0\":\"MIMARKS.survey.food-animal.6.0\",\"MIMARKS.survey.food-farm.env.6.0\":\"MIMARKS.survey.food-farm.env.6.0\",\"MIMARKS.survey.food-human.foods.6.0\":\"MIMARKS.survey.food-human.foods.6.0\",\"MIMARKS.survey.food-prod.facility.6.0\":\"MIMARKS.survey.food-prod.facility.6.0\",\"MIMARKS.survey.host-associated.6.0\":\"MIMARKS.survey.host-associated.6.0\",\"MIMARKS.survey.human-associated.6.0\":\"MIMARKS.survey.human-associated.6.0\",\"MIMARKS.survey.human-gut.6.0\":\"MIMARKS.survey.human-gut.6.0\",\"MIMARKS.survey.human-oral.6.0\":\"MIMARKS.survey.human-oral.6.0\",\"MIMARKS.survey.human-skin.6.0\":\"MIMARKS.survey.human-skin.6.0\",\"MIMARKS.survey.human-vaginal.6.0\":\"MIMARKS.survey.human-vaginal.6.0\",\"MIMARKS.survey.hydrocarbon-cores.6.0\":\"MIMARKS.survey.hydrocarbon-cores.6.0\",\"MIMARKS.survey.hydrocarbon-fluids.swabs.6.0\":\"MIMARKS.survey.hydrocarbon-fluids.swabs.6.0\",\"MIMARKS.survey.microbial.6.0\":\"MIMARKS.survey.microbial.6.0\",\"MIMARKS.survey.miscellaneous.6.0\":\"MIMARKS.survey.miscellaneous.6.0\",\"MIMARKS.survey.plant-associated.6.0\":\"MIMARKS.survey.plant-associated.6.0\",\"MIMARKS.survey.sediment.6.0\":\"MIMARKS.survey.sediment.6.0\",\"MIMARKS.survey.soil.6.0\":\"MIMARKS.survey.soil.6.0\",\"MIMARKS.survey.symbiont-associated.6.0\":\"MIMARKS.survey.symbiont-associated.6.0\",\"MIMARKS.survey.wastewater.6.0\":\"MIMARKS.survey.wastewater.6.0\",\"MIMARKS.survey.water.6.0\":\"MIMARKS.survey.water.6.0\"},\n \"MIMS.me\": {\"MIMS.me.agriculture.6.0\":\"MIMS.me.agriculture.6.0\",\"MIMS.me.air.6.0\":\"MIMS.me.air.6.0\",\"MIMS.me.built.6.0\":\"MIMS.me.built.6.0\",\"MIMS.me.food-animal.6.0\":\"MIMS.me.food-animal.6.0\",\"MIMS.me.food-farm.env.6.0\":\"MIMS.me.food-farm.env.6.0\",\"MIMS.me.food-human.foods.6.0\":\"MIMS.me.food-human.foods.6.0\",\"MIMS.me.food-prod.facility.6.0\":\"MIMS.me.food-prod.facility.6.0\",\"MIMS.me.host-associated.6.0\":\"MIMS.me.host-associated.6.0\",\"MIMS.me.human-associated.6.0\":\"MIMS.me.human-associated.6.0\",\"MIMS.me.human-gut.6.0\":\"MIMS.me.human-gut.6.0\",\"MIMS.me.human-oral.6.0\":\"MIMS.me.human-oral.6.0\",\"MIMS.me.human-skin.6.0\":\"MIMS.me.human-skin.6.0\",\"MIMS.me.human-vaginal.6.0\":\"MIMS.me.human-vaginal.6.0\",\"MIMS.me.hydrocarbon-cores.6.0\":\"MIMS.me.hydrocarbon-cores.6.0\",\"MIMS.me.hydrocarbon-fluids.swabs.6.0\":\"MIMS.me.hydrocarbon-fluids.swabs.6.0\",\"MIMS.me.microbial.6.0\":\"MIMS.me.microbial.6.0\",\"MIMS.me.miscellaneous.6.0\":\"MIMS.me.miscellaneous.6.0\",\"MIMS.me.plant-associated.6.0\":\"MIMS.me.plant-associated.6.0\",\"MIMS.me.sediment.6.0\":\"MIMS.me.sediment.6.0\",\"MIMS.me.soil.6.0\":\"MIMS.me.soil.6.0\",\"MIMS.me.symbiont-associated.6.0\":\"MIMS.me.symbiont-associated.6.0\",\"MIMS.me.wastewater.6.0\":\"MIMS.me.wastewater.6.0\",\"MIMS.me.water.6.0\":\"MIMS.me.water.6.0\"},\n \"MISAG\": {\"MISAG.6.0\":\"MISAG.6.0\",\"MISAG.agriculture.6.0\":\"MISAG.agriculture.6.0\",\"MISAG.air.6.0\":\"MISAG.air.6.0\",\"MISAG.built.6.0\":\"MISAG.built.6.0\",\"MISAG.food-animal.6.0\":\"MISAG.food-animal.6.0\",\"MISAG.food-farm.env.6.0\":\"MISAG.food-farm.env.6.0\",\"MISAG.food-human.foods.6.0\":\"MISAG.food-human.foods.6.0\",\"MISAG.food-prod.facility.6.0\":\"MISAG.food-prod.facility.6.0\",\"MISAG.host-associated.6.0\":\"MISAG.host-associated.6.0\",\"MISAG.human-associated.6.0\":\"MISAG.human-associated.6.0\",\"MISAG.human-gut.6.0\":\"MISAG.human-gut.6.0\",\"MISAG.human-oral.6.0\":\"MISAG.human-oral.6.0\",\"MISAG.human-skin.6.0\":\"MISAG.human-skin.6.0\",\"MISAG.human-vaginal.6.0\":\"MISAG.human-vaginal.6.0\",\"MISAG.hydrocarbon-cores.6.0\":\"MISAG.hydrocarbon-cores.6.0\",\"MISAG.hydrocarbon-fluids.swabs.6.0\":\"MISAG.hydrocarbon-fluids.swabs.6.0\",\"MISAG.microbial.6.0\":\"MISAG.microbial.6.0\",\"MISAG.miscellaneous.6.0\":\"MISAG.miscellaneous.6.0\",\"MISAG.plant-associated.6.0\":\"MISAG.plant-associated.6.0\",\"MISAG.sediment.6.0\":\"MISAG.sediment.6.0\",\"MISAG.soil.6.0\":\"MISAG.soil.6.0\",\"MISAG.symbiont-associated.6.0\":\"MISAG.symbiont-associated.6.0\",\"MISAG.wastewater.6.0\":\"MISAG.wastewater.6.0\",\"MISAG.water.6.0\":\"MISAG.water.6.0\"},\n \"MIUVIG\": {\"MIUVIG.6.0\":\"MIUVIG.6.0\",\"MIUVIG.agriculture.6.0\":\"MIUVIG.agriculture.6.0\",\"MIUVIG.air.6.0\":\"MIUVIG.air.6.0\",\"MIUVIG.built.6.0\":\"MIUVIG.built.6.0\",\"MIUVIG.food-animal.6.0\":\"MIUVIG.food-animal.6.0\",\"MIUVIG.food-farm.env.6.0\":\"MIUVIG.food-farm.env.6.0\",\"MIUVIG.food-human.foods.6.0\":\"MIUVIG.food-human.foods.6.0\",\"MIUVIG.food-prod.facility.6.0\":\"MIUVIG.food-prod.facility.6.0\",\"MIUVIG.host-associated.6.0\":\"MIUVIG.host-associated.6.0\",\"MIUVIG.human-associated.6.0\":\"MIUVIG.human-associated.6.0\",\"MIUVIG.human-gut.6.0\":\"MIUVIG.human-gut.6.0\",\"MIUVIG.human-oral.6.0\":\"MIUVIG.human-oral.6.0\",\"MIUVIG.human-skin.6.0\":\"MIUVIG.human-skin.6.0\",\"MIUVIG.human-vaginal.6.0\":\"MIUVIG.human-vaginal.6.0\",\"MIUVIG.hydrocarbon-cores.6.0\":\"MIUVIG.hydrocarbon-cores.6.0\",\"MIUVIG.hydrocarbon-fluids.swabs.6.0\":\"MIUVIG.hydrocarbon-fluids.swabs.6.0\",\"MIUVIG.microbial.6.0\":\"MIUVIG.microbial.6.0\",\"MIUVIG.miscellaneous.6.0\":\"MIUVIG.miscellaneous.6.0\",\"MIUVIG.plant-associated.6.0\":\"MIUVIG.plant-associated.6.0\",\"MIUVIG.sediment.6.0\":\"MIUVIG.sediment.6.0\",\"MIUVIG.soil.6.0\":\"MIUVIG.soil.6.0\",\"MIUVIG.symbiont-associated.6.0\":\"MIUVIG.symbiont-associated.6.0\",\"MIUVIG.wastewater.6.0\":\"MIUVIG.wastewater.6.0\",\"MIUVIG.water.6.0\":\"MIUVIG.water.6.0\"}\n },\n selected=\"Pathogen.cl.1.0\",\n ),\n ),\n # If GenBank checkbox checked then load Genbank Schema Options\n ui.panel_conditional(\n \"input.GenBank_checkbox\",\n ui.input_select(\n \"GenBank_schemas\",\n label=\"Select SeqSender GenBank Schema:\",\n choices=[\"COV\", \"FLU\", \"OTHER\"],\n selected=\"OTHER\",\n ),\n ),\n ),\n ),\n # Based on choices display config and metadata template\n ui.panel_conditional(\n \"input.BioSample_checkbox || input.SRA_checkbox || input.GenBank_checkbox\",\n ui.card(\n ui.card_header(\n ui.h4(\"Create Config File:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(\n id = \"config_tooltip\",\n description = \"Based on previous selections, required fields for the config file can change. The config file is used to generate the necessary files for submission.\",\n position=\"right\",\n ),\n ),\n ui.card(\n ui.page_fluid(\n div(ui.HTML(\"Submission:\"), style=\"margin-top:-20px\"),\n ui.panel_conditional(\n \"input.BioSample_checkbox || input.SRA_checkbox || input.GenBank_checkbox\",\n config_indent(1, \"NCBI:\", custom_style = \"\"),\n # Username\n config_indent(2, \"Username:\"),\n config_text_input(\"ncbi_config_username\", placeholder = \"NCBI FTP Username\", help_msg = ui.p(\"Username for your NCBI FTP account.\", ui.strong(\"Not your NCBI account username.\"))),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Spuid Namespace\n config_indent(2, \"Spuid_Namespace:\"),\n config_text_input(\"ncbi_config_spuid_namespace\", placeholder = \"NCBI SPUID Namespace\", help_msg = ui.p(\"NCBI SPUID namespace. This should have been provided when you set up your submisison group for NCBI FTP submissions.\")),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # BioSample Package\n ui.panel_conditional(\n \"input.BioSample_checkbox\",\n config_indent(2, \"BioSample_Package:\"),\n div(\n ui.output_text(\"BioSample_Package_Name\",inline=True,),\n shiny_tools.create_help_tooltip(\"config_bs_package\", description = (\"This is predetermined based on database options selected.\"), position = \"none\"),\n style=\"display:inline-block;height:5px;\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n ),\n ui.panel_conditional(\n \"input.GenBank_checkbox\",\n # Automatically remove GenBank samples if failed to upload\n config_indent(2, \"GenBank_Auto_Remove_Failed_Samples:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_auto_remove_genbank\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_auto_remove\", description = (\"If you're submitting to GenBank via FTP, this will automatically remove sequences that fail to pass GenBank's validation and annotation, only if there are samples that did pass. A report file (\", ui.code(\"seq-edit-report.html\"), \") will also be generated explaining the reason why the samples were rejected.\"), position = \"none\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n ),\n # Publication title\n config_indent(2, \"Publication_Title:\"),\n config_text_input(\"ncbi_config_publication_title\", placeholder = \"Publication Title\", help_msg = ui.p(\"Publication title for your NCBI submissions. If your samples are part of a paper/article then that title should be used here, otherwise, use a descriptive title for the submissions you plan to make with this config file.\")),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Publication status\n config_indent(2, \"Publication_Status:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_publication_status\",\n label=None,\n choices=[\"Unpublished\", \"In-press\", \"Published\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_sub_status\", description = (\"If a paper is included with your submission then use \\\"In-press\\\" or \\\"Published\\\". If you haven't or aren't publishing a paper with your samples then use \\\"Unpublished\\\".\"), position = \"none\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Specified release date\n config_indent(2, \"Specified_Release_Date:\"),\n config_text_input(\"ncbi_config_release_date\", placeholder = \"Release Date\", help_msg = \"Release date for NCBI submissions. Allows you to specify when should NCBI make your submissions public, allowing you to submit your samples ahead of a planned release. If you want to release samples immediately leave blank or specify a date as \\\"YYYY-MM-DD\\\" to release at a specific date. This field also takes the option of a numeric value followed by one of the key words \\\"days\\\", \\\"weeks\\\", or \\\"months\\\", to have SeqSender create a specified release date based on when SeqSender is ran.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Link sample between NCBI databases\n config_indent(2, \"Link_Sample_Between_NCBI_Databases:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_link_samples\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_link_sample\", description = (\"If you're submitting your samples to multiple NCBI databases, do you want your sample's data linked between each database?\"), position = \"none\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Add NCBI accessions to FASTA def lines\n config_indent(2, \"Add_Definition_Line_Accessions:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_fasta_def_lines\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_fasta_def_lines\", description = (\"Accessions from BioSample and SRA are added to the GenBank (\", ui.code(\"source.src\"), \") file during the submission process to link between databases. Enable this to additionally add them to the fasta definition lines for each sequence.\"), position = \"none\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Description category\n config_indent(2, \"Description:\", custom_style = \"\"),\n # Organization category\n config_indent(3, \"Organization\", custom_style = \"\"),\n # Organization role\n config_indent(4, \"Role:\"),\n config_text_input(\"ncbi_config_role\", placeholder=\"Organization Role\", help_msg = \"Provided by NCBI when setting up your FTP account.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Organization type\n config_indent(4, \"Type:\"),\n config_text_input(\"ncbi_config_type\", placeholder= \"Organization Type\", help_msg = \"Provided by NCBI when setting up your FTP account.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Organization name\n config_indent(4, \"Name:\"),\n config_text_input(\"ncbi_config_org_name\", placeholder = \"Organization Name\", help_msg = \"Submitting group's name.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # Address category\n config_indent(5, \"Address:\", custom_style = \"\"),\n # submitter affiliation\n config_indent(6, \"Affil:\"),\n config_text_input(\"ncbi_config_affil\", placeholder = \"Submitter Affiliation\", help_msg = \"Submitting organization's full name.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter division\n config_indent(6, \"Div:\"),\n config_text_input(\"ncbi_config_div\", placeholder = \"Submitter Division\", help_msg = \"Submitting department/laboratory name.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter street\n config_indent(6, \"Street:\"),\n config_text_input(\"ncbi_config_street\", placeholder = \"Submitting Organization Street Name\", help_msg = \"Street name.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter city\n config_indent(6, \"City:\"),\n config_text_input(\"ncbi_config_city\", placeholder = \"Submitting Organization City\", help_msg = \"City.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter state\n config_indent(6, \"Sub:\"),\n config_text_input(\"ncbi_config_state\", placeholder = \"Submitting Organization State/Providence\", help_msg = \"State/Providence.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter zipcode\n config_indent(6, \"Postal_Code:\"),\n config_text_input(\"ncbi_config_postal\", placeholder = \"Submitting Organization Postal Code\", help_msg = \"Postal code.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter country\n config_indent(6, \"Country:\"),\n config_text_input(\"ncbi_config_country\", placeholder = \"Submitting Organization Country\", help_msg = \"Country\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter contact email\n config_indent(6, \"Email:\"),\n config_text_input(\"ncbi_config_email\", placeholder = \"Submitting Organization Email\", help_msg = \"Email for someone to contact you at if they have questions about your samples.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter contact phone\n config_indent(6, \"Phone:\"),\n config_text_input(\"ncbi_config_phone\", placeholder = \"Submitting Organization Phone\", help_msg = \"Phone number for someone to contact you at if they have questions about your samples.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter point of contact\n config_indent(5, \"Submitter\", custom_style = \"\"),\n # submitter poc email\n config_indent(6, \"Email:\"),\n config_text_input(\"ncbi_sub_email_one\", \"Submitter Contact Email\", help_msg = \"Email for someone at NCBI to contact about issues during the submission process.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # submitter poc email\n config_indent(6, \"Alt_Email:\"),\n config_text_input(\"ncbi_sub_email_two\", \"Submitter Contact Email\", help_msg = \"Alternate email for someone at NCBI to contact about issues during the submission process.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n # poc name\n config_indent(6, \"Name:\", custom_style = \"\"),\n # poc name first\n config_indent(7, \"First:\"),\n config_text_input(\"ncbi_config_first_name\", placeholder = \"Submitter First Name\", help_msg = \"Who is making the submission: First Name.\"),\n div(ui.HTML(\"
\"), style=\"margin-top:-25px;\"),\n config_indent(7, \"Last:\"),\n config_text_input(\"ncbi_config_last_name\", placeholder = \"Submitter Last Name\", help_msg = \"Who is making the submission: Last Name.\"),\n ),\n ),\n style=yaml_css,\n ),\n ui.download_button(\"download_config\", \"Download Config File\"),\n ),\n ui.card(\n ui.card_header(\n ui.h4(\"Metadata Template:\", style=\"display:inline-block;\"),\n ui.tooltip(\n ui.p(\"\u2753\"),\n \"Additional info\",\n id=\"metadata_tooltip\",\n style=\"display:inline-block;float:right;\",\n ),\n ),\n ui.HTML(\n \"

Note: More columns may be available not displayed in this list. To add a column not here during submission, add it matching the style of the other columns related to the database: database_prefix-column_name.\"\n ),\n ui.output_table(\"load_database_metadata_dataframe\"),\n ui.HTML(\n \"\"\"\nMetadata Sections Legend:\n

SeqSender: No prefix | BioSample: bs- | SRA: sra- | GenBank: gb-

\n\"\"\"\n ),\n ui.download_button(\"download_metadata\", \"Download Metadata Template\"),\n ),\n ),\n]\n", "type": "text"}, {"name": "shiny_tools.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n\nterminal_css = \"\"\n\ndef software_requirements(version):\n requirements = \"\"\"
\n

SOFTWARE REQUIREMENTS:

\n
    \n
  • Linux (64-bit) or Mac OS X (64-bit)
  • \n
  • Git version 2.25.1 or later
  • \n
  • Standard utilities: curl, tar, unzip
  • \n\"\"\"\n if version == \"Local\":\n return ui.HTML(requirements + \"\"\"
\"\"\")\n elif version == \"Docker\":\n return ui.HTML(\n requirements\n + \"\"\"\n
  • Docker version 20.10.14 or later
  • \n
  • [Optional] Docker Compose version 2.21 or later
  • \n\n\"\"\"\n )\n elif version == \"Singularity\":\n return ui.HTML(\n requirements\n + \"\"\"\n
  • Singularity version 3.8.7 or later
  • \n\n\"\"\"\n )\n else:\n return \"\"\n\ndef seqsender_help_output_msg(version):\n message = \"\"\"\nusage: seqsender.py [-h] {prep,submit,submission_status,load_credentials,test_data,update_biosample,test_network_connection,version} ...

    \n

    Automate the process of batch uploading consensus sequences and metadata to databases of your choices

    \n

    positional arguments:
    \n | {prep,submit,submission_status,load_credentials,test_data,update_biosample,test_network_connection,version}

    \n

    optional arguments:
    \n | -h, --help |  show this help message and exit

    \n\"\"\"\n if version == \"Local\":\n command = (\n \"\"\"

    (seqsender) [USER@server seqsender]$ python seqsender.py --help
    \"\"\"\n )\n elif version == \"Docker\":\n command = \"\"\"

    docker exec -it seqsender bash seqsender-kickoff --help
    \"\"\"\n elif version == \"Singularity\":\n command = \"\"\"

    singularity exec ~/singularity/seqsender.sif seqsender-kickoff --help
    \"\"\"\n else:\n command = \"\"\"

    \"\"\"\n return ui.card(ui.HTML(command + message), style=terminal_css)\n\n\ndatabases_parameter = [\n ui.strong(\"Databases\"),\n ui.tags.ul(\n ui.tags.li(\n ui.strong(\n ui.code(\"--biosample\"),\n \" | \",\n ui.code(\"-b\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: BioSample\"),\n \".\",\n inline=True,\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"--sra\"),\n \" | \",\n ui.code(\"-s\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: SRA\"),\n \".\",\n inline=True,\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"--genbank\"),\n \" | \",\n ui.code(\"-n\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: GenBank\"),\n \".\",\n inline=True,\n ),\n ),\n ),\n]\n\norganisms_parameter = [\n ui.strong(\"Organism\"),\n ui.div(\n ui.strong(ui.code(\"--organism \"), \"{'FLU', 'COV', 'OTHER'}\"),\n inline=True,\n ),\n ui.p(\n \"Organism selection adjusts seqsender submission process for organism specific criteria.\"\n ),\n ui.tags.ul(\n ui.tags.li(\n ui.strong(\n ui.code(\"FLU\"),\n ),\n ui.tags.ul(\n \" For \",\n ui.strong(\"Influenza A virus\"),\n \", enables FTP GenBank submission.\",\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"COV\"),\n ),\n ui.tags.ul(\n \" For \",\n ui.strong(\"SARS-CoV-2\"),\n \", enables FTP GenBank submission.\",\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"OTHER\"),\n ),\n ui.tags.ul(\n \" For any organism that does not have special submission options.\"\n ),\n ),\n ),\n]\n\nsubmission_directory_parameter = ui.div(\n ui.strong(ui.code(\"--submission_dir\")),\n ui.tags.ul(\"Directory where all files required for submission are stored.\"),\n)\n\nsubmission_name_parameter = ui.div(\n ui.strong(ui.code(\"--submission_name\")),\n ui.tags.ul(\"Unique name to use for submission. Used as a unique identifier for submission to databases and to name the files created for submission.\"),\n)\n\nconfig_parameter = ui.div(\n ui.strong(ui.code(\"--config_file\")),\n ui.tags.ul(\"Full path to config file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\nencrypt_config_parameter = ui.div(\n ui.strong(ui.code(\"--config_file\")),\n ui.tags.ul(\"Config file to be used in the creation/submission of your samples. Input full file path.\"),\n)\n\ndecrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Key provided to access credentials stored in config file.\"),\n)\n\nencrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Encryption key to use when encrypting your credentials. Allows the user to reuse the encryption key for multiple config files for users where multiple config files are needed for different submission criteria.\"),\n)\n\nmulti_decrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Key provided to access credentials stored in config file. Multiple keys may be provided if multiple config files are being checked.\"),\n)\n\nmetadata_parameter = ui.div(\n ui.strong(ui.code(\"--metadata_file\")),\n ui.tags.ul(\"Full path to metadata file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\nfasta_parameter = ui.div(\n ui.strong(ui.code(\"--fasta_file\")),\n ui.tags.ul(\"Full path to fasta file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\ntable2asn_parameter = ui.div(\n ui.strong(ui.code(\"--table2asn\")),\n ui.tags.ul(\"Flag to enable a \\\"table2asn\\\" submission for GenBank. Automatically enabled for organisms other than \\\"FLU\\\" and \\\"COV\\\".\"),\n)\n\ngff_parameter = ui.div(\n ui.strong(ui.code(\"--gff_file\")),\n ui.tags.ul(\"Full path to gff file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\ntest_parameter = ui.div(\n ui.strong(ui.code(\"--test\")),\n ui.tags.ul(\"Flag to enable a \\\"test\\\" submission to each database selected.\"),\n)\n\nvalidation_parameter = ui.div(\n ui.strong(ui.code(\"--skip_validation\")),\n ui.tags.ul(\"Flag to skip pandera validation for \", ui.code(\"--metadata_file\"), \". Warning, skipping validation can cause unexpected errors when missing required data.\"),\n)\n\npublication_parameter = [\n ui.div(\n ui.strong(ui.code(\"--publication_title\")),\n ui.tags.ul(\"Publication Title associated with sample submission. For GenBank only, overwrites value given via config file.\"),\n ),\n ui.div(\n ui.strong(ui.code(\"--publication_status\"), \"{ 'Unpublished', 'In-press', 'Published' }\"),\n ui.tags.ul(\"Status of publication associated with sample submission. For GenBank only, overwrites value given via config file.\"),\n )\n]\n\n\ndef seqsender_submit_help_output_msg(version):\n message = \"\"\"\nusage: seqsender.py submit [-h] [--biosample] [--sra] [--genbank] --organism {FLU,COV,OTHER}\n--submission_name SUBMISSION_NAME --submission_dir SUBMISSION_DIR --config_file CONFIG_FILE --key KEY\n--metadata_file METADATA_FILE --fasta_file FASTA_FILE [--table2asn] [--gff_file GFF_FILE] [--test] [--skip_validation]\n[--publication_title PUBLICATION_TITLE] [--publication_status {Unpublished,In-press,Published}]

    \n

    Create submission files and then batch uploading them to databases of choices.

    \n

    optional arguments:
    \n -h, --help  |  |  |  \nshow this help message and exit
    \n --biosample, -b  |  | \nSubmit to BioSample database. (default: )
    \n --sra, -s  |  |  |  \nSubmit to SRA database. (default: )
    \n --genbank, -n  |  |  \nSubmit to Genbank database. (default: )
    \n --organism {FLU,COV,OTHER}
     |  |  |  | \nType of organism data (default: FLU)
    \n --submission_name SUBMISSION_NAME
     |  |  |  | \nName of the submission (default: None)
    \n --submission_dir SUBMISSION_DIR
     |  |  |  | \nDirectory to where all required files (such as metadata, fasta, etc.) are stored (default: None)
    \n --config_file CONFIG_FILE
     |  |  |  | \nConfig file stored in submission directory (default: None)
    \n --key KEY
     |  |  |  | \nKey provided to access credentials stored in config file (default: None)
    \n --metadata_file METADATA_FILE
     |  |  |  | \nMetadata file stored in submission directory (default: None)
    \n --fasta_file FASTA_FILE
     |  |  |  | \nFasta file stored in submission directory (default: None)
    \n --table2asn  |  |  \nWhether to prepare a Table2asn submission. (default: False)
    \n --gff_file GFF_FILE  \nAn annotation file to add to a Table2asn submission (default: None)
    \n --test  |  |  |  | \nWhether to perform a test submission. (default: False)
    \n\"\"\"\n if version == \"Local\":\n command = \"\"\"

    (seqsender) [USER@server seqsender]$ python seqsender.py submit --help
    \"\"\"\n elif version == \"Docker\":\n command = (\n \"\"\"

    docker exec -it seqsender bash seqsender-kickoff submit --help
    \"\"\"\n )\n elif version == \"Singularity\":\n command = \"\"\"

    singularity exec ~/singularity/seqsender.sif seqsender-kickoff submit --help
    \"\"\"\n else:\n command = \"\"\"\"\"\"\n return ui.card(ui.HTML(command + message), style=terminal_css)\n\n# Returns parameters in format for code example and descriptive list of parameter\ndef get_parameters(command, output):\n command_string = \"\"\n parameters = []\n # Databases parameter\n if command in [\"prep\", \"submit\", \"test_data\"]:\n command_string += \" [<databases>]\"\n parameters.append(databases_parameter)\n # Organisms parameter\n if command in [\"prep\", \"submit\", \"test_data\"]:\n command_string += \" [--organism <organism>]\"\n parameters.append(organisms_parameter)\n # Submission_dir parameter\n if command in [\"prep\", \"submit\", \"test_data\", \"submission_status\"]:\n command_string += \" [--submission_dir <directory_path>]\"\n parameters.append(submission_directory_parameter)\n # Add submission_name parameter\n if command in [\"prep\", \"submit\", \"submission_status\"]:\n command_string += \" [--submission_name <name>]\"\n parameters.append(submission_name_parameter)\n # Add config_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--config_file <config_file_path>]\"\n parameters.append(config_parameter)\n # Add decrypt_key parameter\n if command in [\"submit\"]:\n command_string += \" [--key <key>]\"\n parameters.append(decrypt_key_parameter)\n # Add multi_decrypt_key parameter\n if command in [\"submission_status\"]:\n command_string += \" [--key <key>]\"\n parameters.append(multi_decrypt_key_parameter)\n # Add encrypt_config parameter\n if command in [\"load_credentials\"]:\n command_string += \" [--config_file <config_file_path>]\"\n parameters.append(encrypt_config_parameter)\n # Add encrypt_key parameter\n if command in [\"load_credentials\"]:\n command_string += \" [--key <key>]\"\n parameters.append(encrypt_key_parameter)\n # Add metadata_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--metadata_file <metadata_file_path>]\"\n parameters.append(metadata_parameter)\n # Add fasta_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--fasta_file <fasta_file_path>]\"\n parameters.append(fasta_parameter)\n # Add table2asn parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--table2asn]\"\n parameters.append(table2asn_parameter)\n # Add gff_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--gff_file <gff_file_path>]\"\n parameters.append(gff_parameter)\n # Add test parameter\n if command in [\"submit\"]:\n command_string += \" [--test]\"\n parameters.append(test_parameter)\n # Add skip pandera validation parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--skip_validation]\"\n parameters.append(validation_parameter)\n if output == \"string\":\n return command_string\n elif output == \"description\":\n return parameters\n\ndef seqsender_example_command(platform, command, flags):\n # Platform specific layout\n message = \"

    \"\n    if platform == \"local\":\n        message += \"python seqsender.py \"\n    elif platform == \"docker\":\n        message += \"docker exec -it seqsender bash seqsender-kickoff \"\n    elif platform == \"singularity\":\n        message += \"singularity exec ~/singularity/seqsender.sif seqsender-kickoff \"\n    else:\n        message += \"\"\n    # Seqsender command\n    message += command\n    ### Add parameters\n    message += get_parameters(command, \"string\") + \"
    \"\n return ui.HTML(message)\n\ndef command_submenu_accordion(command):\n submenu = []\n open_tabs = []\n parameters = get_parameters(command, \"description\")\n if len(parameters) > 0:\n submenu.append(ui.accordion_panel(\"Parameters\", parameters))\n open_tabs.append(\"Parameters\")\n notes = [] # notes function\n if len(notes) > 0:\n submenu.append(ui.accordion_panel(\"Notes\", notes))\n open_tabs.append(\"Notes\")\n examples = [] # examples function\n if len(examples) > 0:\n submenu.append(ui.accordion_panel(\"Examples\", examples))\n if len(submenu) > 0:\n return ui.accordion(*submenu, open = open_tabs)\n else:\n return \"\"\n\ndef command_accordion_panel(command, description):\n return ui.accordion_panel(\n command.capitalize(),\n ui.p(\n \"The \",\n ui.code(command),\n description,\n ),\n seqsender_example_command(\"local\", command, \"\"),\n command_submenu_accordion(command),)\n\ndef file_output_column_info(column_name, description, controlled_fields):\n list_item = ui.tags.li(\n ui.strong(\n ui.code(column_name),\n ),\n ui.tags.ul(\n ui.p(description),\n file_output_controlled_field_info(controlled_fields),\n )\n )\n return list_item\n\ndef file_output_controlled_field_info(controlled_fields):\n keywords = []\n if controlled_fields:\n for key, description in controlled_fields:\n keywords.append(ui.tags.li(ui.p(ui.strong(key, \": \"), description), style=\"margin-top:10px;\"))\n return keywords\n\ndef create_help_tooltip(id, description, position):\n return ui.tooltip(ui.p(\"\u2753\"),description,id=id,style=\"display:inline-block;float:\" + position + \";\",)\n", "type": "text"}, {"name": "templates/config.biosample.Beta-lactamase.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-beta_lactamase_family,Required,Specify the beta-lactamase family for this gene.\nbs-carbapenemase,Required,\"Does the enzyme exhibit carbapenemase activity? If the enzyme does exhibit carbapenemase activity, the response should be \"\"yes\"\", otherwise \"\"no.\"\"\"\nbs-edta_inhibitor_tested,Required,\"Was carbapenemase activity tested in the presence of EDTA? If carbapenemase activity was tested in the presence of EDTA, the response should be \"\"yes\"\", otherwise \"\"no\u201d.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lab_host,Optional,\"Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Human.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-age,Required,\"age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-biomaterial_provider,Required,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sex,Required,physical sex of sampled organism\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_subtype,Optional,\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-dev_stage,Optional,Developmental stage at the time of sampling.\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-ethnicity,Optional,ethnicity of the subject\nbs-health_state,Optional,Health or disease status of sample at time of collection\nbs-karyotype,Optional,\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-population,Optional,\"for human: ; for plants: filial generation, number of progeny, genetic structure\"\nbs-race,Optional,\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Invertebrate.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-breed,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". breed name - chiefly used in domesticated animals or plants\"\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-age,Optional,\"age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-dev_stage,Optional,Developmental stage at the time of sampling.\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sex,Optional,physical sex of sampled organism\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Metagenome.environmental.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Microbe.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sample_type,Required,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-genotype,Optional,observed genotype\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lab_host,Optional,\"Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-mating_type,Optional,\nbs-passage_history,Optional,Number of passages and passage method\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Model.organism.animal.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-breed,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". breed name - chiefly used in domesticated animals or plants\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-age,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-dev_stage,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". Developmental stage at the time of sampling.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sex,Required,physical sex of sampled organism\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-birth_date,Optional,\nbs-birth_location,Optional,\nbs-breeding_history,Optional,\nbs-breeding_method,Optional,\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_subtype,Optional,\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-death_date,Optional,\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-genotype,Optional,observed genotype\nbs-growth_protocol,Optional,\nbs-health_state,Optional,Health or disease status of sample at time of collection\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-stud_book_number,Optional,\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.OneHealthEnteric.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-source_type,Required,\"Controlled vocabulary describing the isolation_source. Choose the best fit term: Human, Animal, Food, Environmental, Other, e.g., Food\"\nbs-strain,Required,microbial or eukaryotic strain name\nbs-animal_env,Optional,\"The environment from which the animal sample was taken, e.g., veterinary clinic\"\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-building_setting,Optional,location (geography) where a building is set\nbs-coll_site_geo_feat,Optional,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Optional,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Optional,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_industry_class,Optional,\"The US FDA Class is the second of five elements that comprise a FDA product code. This element is directly related to an Industry and designates the food group, source, product, use, pharmacological action, category or animal species of the product. A Class code is more specific than an Industry; for example, the Fishery/Seafood products Industry may contain Classes such as Smoked, Breaded and such, e.g., Coffee, Decaffeinated\"\nbs-food_industry_code,Optional,\"The US FDA Industry Code is the first of five elements that comprise an FDA product code. An Industry code determines the broadest area into which a product falls, e.g., 31 Coffee and Tea\"\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_processing_method,Optional,\"Methods for processing food, e.g., food (blanched) [FOODON:00002767]\"\nbs-food_prod,Optional,\"Descriptors of the food production system or of the agricultural environment and growing conditions related to the farm production system. This field encourages terms listed under food production (http://purl.obolibrary.org/obo/FOODON_03530206). Multiple terms may apply and can be separated by pipes, e.g., restaurant food preparation process [FOODON:03530110]\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_type_processed,Optional,\"Food type processed in facility, e.g., dairy\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_animal_breed,Optional,\"The animal breed of the host organism. Used mainly for animal hosts, e.g., duroc, angus, mixed breed\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_variety,Optional,\"The variety or cultivar of the host organism; the name given to a particular variety of organism to distinguish it from otherwise similar organisms of the same species, e.g., romaine lettuce; Athena melons; Patio Snacker cucumbers\"\nbs-ifsac_category,Optional,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-indoor_surf_subpart,Optional,\"The subpart of the object(s) that was swabbed, like a cart, drain, counter, etc., e.g., wheel\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolate_name_alias,Optional,Other IDs associated with this isolate or strain. Separate with '; ' if more than one\nbs-label_claims,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free, e.g., wild caught\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-location_in_facility,Optional,\"Name of the location or room in the facility where the sampling occurred, e.g., ripening room\"\nbs-material_condition,Optional,\"Condition of material sampled, e.g., rusted\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-project_name,Optional,\"A concise name that describes the overall project, for example \"\"Analysis of sequences collected from Antarctic soil\"\"\"\nbs-reference_material,Optional,\"Indicates that a standards body or external group asserts this sample is reference material, eg, 'NIST reference material for genome sequencing validation'.\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-sanitizer_used_postharvest,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; indicate the sanitizer used during the postharvest cleaning process. Multiple terms can be separated by pipes, e.g., chlorine bleach\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-spec_intended_cons,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed. This field encourages terms listed under food consumer group (http://purl.obolibrary.org/obo/FOODON_03510136), e.g., infant or toddler as food consumer [FOODON:03510020]\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-surface_orientation,Optional,\"Describe which surface of the object is swabbed. (e.g underside, top, corner), e.g., underside\"\nbs-upstream_intervention,Optional,\"List any known health-related interventions (prophylactic, therapeutic, and/or metaphylactic) administered to the host, i.e. vaccinations, hormonal patches, antibiotics, injections in feed, etc., e.g., prophylactic/metaphylactic antibiotics\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Pathogen.cl.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Required,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-genotype,Optional,observed genotype\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_description,Optional,Additional information not included in other defined vocabulary fields\nbs-host_disease_outcome,Optional,\"Final outcome of disease, e.g., death, chronic disease, recovery\"\nbs-host_disease_stage,Optional,Stage of disease at the time of sampling\nbs-host_health_state,Optional,Information regarding health state of the individual sampled at the time of sampling\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-passage_history,Optional,Number of passages and passage method\nbs-pathotype,Optional,\"Some bacterial specific pathotypes (example Eschericia coli - STEC, UPEC)\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-subgroup,Optional,Taxonomy below subspecies; sometimes used in viruses to denote subgroups taken from a single isolate.\nbs-subtype,Optional,\"Used as classifier in viruses (e.g. HIV type 1, Group M, Subtype A).\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Pathogen.env.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-genotype,Optional,observed genotype\nbs-passage_history,Optional,Number of passages and passage method\nbs-pathotype,Optional,\"Some bacterial specific pathotypes (example Eschericia coli - STEC, UPEC)\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-subgroup,Optional,Taxonomy below subspecies; sometimes used in viruses to denote subgroups taken from a single isolate.\nbs-subtype,Optional,\"Used as classifier in viruses (e.g. HIV type 1, Group M, Subtype A).\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Plant.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-age,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-dev_stage,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". Developmental stage at the time of sampling.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-genotype,Optional,observed genotype\nbs-growth_protocol,Optional,\nbs-height_or_length,Optional,measurement of height or length\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-population,Optional,\"for human: ; for plants: filial generation, number of progeny, genetic structure\"\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-sex,Optional,physical sex of sampled organism\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.SARS-CoV-2.cl.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Required,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-antiviral_treatment_agent,Optional,What was the antiviral treatment agent?\nbs-collection_device,Optional,\"Instrument or container used to collect sample, e.g., swab\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-date_of_prior_antiviral_treat,Optional,\"Date of the SARS-CoV-2 antiviral treatment, e.g., 2021-03-30\"\nbs-date_of_prior_sars_cov_2_infection,Optional,\"Date of the prior SARS-CoV-2 infection, e.g., 2021-03-30\"\nbs-date_of_sars_cov_2_vaccination,Optional,\"Date of the 1st dose of the SARS-CoV-2 vaccine, e.g., 2021-03-30\"\nbs-exposure_event,Optional,\"Event leading to exposure, e.g., mass gathering\"\nbs-geo_loc_exposure,Optional,\"The country where the host was likely exposed to the causative agent of the illness. This location pertains to the country the host was believed to be exposed, and may not be the same as the host's country of residence, e.g., Canada\"\nbs-gisaid_accession,Optional,\"The GISAID accession assigned to the sequence. GISAID Accession Numbers are used as unique and permanent identifiers for each virus beginning with the letters EPI and followed by numbers, to identify viruses and/or segments; https://www.gisaid.org/; e.g., EPI_ISL_1091361\"\nbs-gisaid_virus_name,Optional,\"The full virus name submitted to GISAID (https://www.gisaid.org/), e.g., hCoV-19/Belgium/rega-3187/2021\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_anatomical_material,Optional,\"Host anatomical material or substance produced by the body where the sample was obtained, e.g., stool, mucus, saliva\"\nbs-host_anatomical_part,Optional,\"Anatomical part of the host organism (e.g. tissue) that was sampled, e.g., nasopharynx\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_disease_outcome,Optional,\"Final outcome of disease, e.g., death, chronic disease, recovery\"\nbs-host_health_state,Optional,Information regarding health state of the individual sampled at the time of sampling\nbs-host_recent_travel_loc,Optional,\"The name of the country that was the destination of most recent travel. Specify the countries (and more granular locations if known) travelled, e.g., United Kingdom. Can include multiple travels; separate multiple travel events with a semicolon.\"\nbs-host_recent_travel_return_date,Optional,\"The date of a person's most recent return to some residence from a journey originating at that residence, e.g., 2021-03-30\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_specimen_voucher,Optional,\"Identifier for the physical specimen. Include a URI (Uniform Resource Identifier) in the form of a URL providing a direct link to the physical host specimen. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical host voucher specimen. If a URI is not available, a museum-provided globally unique identifier (GUID) can be used. URI example: http://portal.vertnet.org/o/fmnh/mammals?id=33e55cfe-330b-40d9-aaae-8d042cba7542; INSDC triplet example: UAM:Mamm:52179\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-passage_method,Optional,\"Description of how the organism was passaged. Provide a short description, e.g., AVL buffer+30%EtOH lysate received from Respiratory Lab. P3 passage in Vero-1 via bioreactor large-scale batch passage. P3 batch derived from the SP-2/reference lab strain. If not passaged, put \"\"\"\"not applicable\"\"\"\".\"\nbs-passage_number,Optional,\"The number of known passages, e.g., 3. If not passaged, put \"\"\"\"not applicable\"\"\"\".\"\nbs-prior_sars_cov_2_antiviral_treat,Optional,Has the host received SARS-CoV-2 antiviral treatment?\nbs-prior_sars_cov_2_infection,Optional,Did the host have a prior SARS-CoV-2 infection?\nbs-prior_sars_cov_2_vaccination,Optional,Has the host received a SARS-CoV-2 vaccination?\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-purpose_of_sequencing,Optional,\"The reason the sample was sequenced, e.g., baseline surveillance (random sampling)\"\nbs-sars_cov_2_diag_gene_name_1,Optional,The name of the gene used in the first diagnostic SARS-CoV-2 RT-PCR test.\nbs-sars_cov_2_diag_gene_name_2,Optional,The name of the gene used in the second diagnostic SARS-CoV-2 RT-PCR test.\nbs-sars_cov_2_diag_pcr_ct_value_1,Optional,\"The cycle threshold (CT) value result from the first diagnostic SARS-CoV-2 RT-PCR test, e.g., 21\"\nbs-sars_cov_2_diag_pcr_ct_value_2,Optional,\"The cycle threshold (CT) value result from the second diagnostic SARS-CoV-2 RT-PCR test, e.g., 36\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-vaccine_received,Optional,\"Which vaccine did the host receive, e.g., Pfizer-BioNTech COVID-19 vaccine\"\nbs-virus_isolate_of_prior_infection,Optional,\"Specific isolate of SARS-CoV-2 in prior infection (if known), e.g., SARS-CoV-2/human/USA/CA-CDPH-001/2020\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.SARS-CoV-2.wwsurv.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-ww_population,Required,\"Number of persons contributing wastewater to this sample collection site; if unknown, estimate to the nearest order of magnitude, e.g., 10000. If no estimate is available, input NA.\"\nbs-ww_sample_duration,Required,\"Duration of composite sample collected, in units of hours, e.g., 24. Specify integer values. If the sample is not a composite sample, use 0.\"\nbs-ww_sample_matrix,Required,The wastewater matrix that was sampled\nbs-ww_sample_type,Required,Type of wastewater sample collected\nbs-ww_surv_target_1,Required,\"Taxonomic name of the surveillance target. For the COVID-19 response, use 'SARS-CoV-2'.\"\nbs-ww_surv_target_1_known_present,Required,\"Is genetic material of the surveillance target(s) known to the submitter to be present in this wastewater sample? Presence defined as microbiological evidence of the target organism in the wastewater sample, such as genetic- or culture-based detection.\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-purpose_of_ww_sampling,Optional,The reason the sample was collected\nbs-purpose_of_ww_sequencing,Optional,\"The reason the sample was sequenced, e.g., identification of mutations within a specific region, presence of clinically known mutations, or diversity of mutations across entire genome\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-ww_endog_control_1,Optional,\"The name of an organism, gene, or compound used as an endogenous wastewater control, e.g., pepper mild mottle virus\"\nbs-ww_endog_control_1_conc,Optional,\"The concentration of the endogenous control specified in 'ww_endog_control_1' on a per wastewater unit basis, e.g., 700000000\"\nbs-ww_endog_control_1_protocol,Optional,\"The protocol used to quantify 'ww_endog_control_1'. Specify a reference, website, or brief description.\"\nbs-ww_endog_control_1_units,Optional,\"The units of the value specified in 'ww_endog_control_1_conc', e.g., copies/L wastewater\"\nbs-ww_endog_control_2,Optional,\"The name of an organism, gene, or compound used as an endogenous wastewater control, e.g., crassphage\"\nbs-ww_endog_control_2_conc,Optional,\"The concentration of the endogenous control specified in 'ww_endog_control_2' on a per wastewater unit basis, e.g., 140000000\"\nbs-ww_endog_control_2_protocol,Optional,\"The protocol used to quantify 'ww_endog_control_2'. Specify a reference, website, or brief description.\"\nbs-ww_endog_control_2_units,Optional,\"The units of the value specified in 'ww_endog_control_2_conc', e.g., copies/L wastewater\"\nbs-ww_flow,Optional,\"Daily volumetric flow through collection site, in units of liters per day, e.g., 110000000.\"\nbs-ww_industrial_effluent_percent,Optional,\"Percentage of industrial effluents received by wastewater treatment plant, e.g., 10\"\nbs-ww_ph,Optional,\"pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid, e.g., 7.2\"\nbs-ww_population_source,Optional,\"Source of value specified in 'ww_population', e.g., wastewater utility billing records, population of jurisdiction encompassing the wastewater service area, census blocks clipped to wastewater service area polygon\"\nbs-ww_pre_treatment,Optional,\"Describe any process of pre-treatment that removes materials that can be easily collected from the raw wastewater, e.g., flow equilibration basin promotes settling of some solids\"\nbs-ww_primary_sludge_retention_time,Optional,\"The time primary sludge remains in tank, in hours, e.g., 4.\"\nbs-ww_processing_protocol,Optional,\"The protocol used to process the wastewater sample. Processing includes laboratory procedures prior to and including nucleic acid purification (e.g., pasteurization, concentration, extraction, etc). Specify a reference, website, or brief description.\"\nbs-ww_sample_salinity,Optional,\"Salinity is the total concentration of all dissolved salts in a liquid or solid (in the form of an extract obtained by centrifugation) sample or derived from the conductivity measurement (practical salinity) in milligrams per liter, e.g., 100.\"\nbs-ww_sample_site,Optional,The type of site where the wastewater sample was collected\nbs-ww_surv_jurisdiction,Optional,\"A jurisdiction identifer that can be used to support linking the sample to a public health surveillance system, e.g., va\"\nbs-ww_surv_system_sample_id,Optional,\"The sample ID used for submission to a public health surveillance system (e.g., CDC's National Wastewater Surveillance System), e.g., s123456\"\nbs-ww_surv_target_1_conc,Optional,\"The concentration of the wastewater surveillance target specified in 'ww_surv_target_1' on a per wastewater unit basis, e.g., 200000\"\nbs-ww_surv_target_1_conc_unit,Optional,\"The units of the value specified in 'ww_surv_target_1_conc', e.g., copies/L wastewater\"\nbs-ww_surv_target_1_extract,Optional,\"Measured amount of surveillance target in the nucleic acid extract that was sequenced; on a per extract unit basis, rather than on a per wastewater sample unit basis, e.g., 100000\"\nbs-ww_surv_target_1_extract_unit,Optional,\"The units of the value specified in 'ww_surv_target_1_extract', e.g., copies/microliter extract\"\nbs-ww_surv_target_1_gene,Optional,\"The name of the gene quantified for the the surveillance target specified in 'ww_surv_target_1', e.g., N gene\"\nbs-ww_surv_target_1_protocol,Optional,\"The protocol used to quantify 'ww_surv_target_1'. Specify a reference, website, or brief description.\"\nbs-ww_surv_target_2,Optional,\"Taxonomic name of the surveillance target, eg, Norovirus\"\nbs-ww_surv_target_2_conc,Optional,\"The concentration of the wastewater surveillance target specified in 'ww_surv_target_2' on a per wastewater unit basis, e.g., 24000\"\nbs-ww_surv_target_2_conc_unit,Optional,\"The units of the value specified in 'ww_surv_target_2_conc', e.g., copies/L wastewater\"\nbs-ww_surv_target_2_extract,Optional,\"Measured amount of surveillance target in the nucleic acid extract that was sequenced; on a per extract unit basis, rather than on a per wastewater sample unit basis, e.g., 12000\"\nbs-ww_surv_target_2_extract_unit,Optional,\"The units of the value specified in 'ww_surv_target_2_extract', e.g., copies/microliter extract\"\nbs-ww_surv_target_2_gene,Optional,\"The name of the gene quantified for the the surveillance target specified in 'ww_surv_target_2', e.g., ORF1-ORF2 junction\"\nbs-ww_surv_target_2_known_present,Optional,\"Is genetic material of the surveillance target(s) known to the submitter to be present in this wastewater sample? Presence defined as microbiological evidence of the target organism in the wastewater sample, such as genetic- or culture-based detection.\"\nbs-ww_surv_target_2_protocol,Optional,\"The protocol used to quantify 'ww_surv_target_2'. Specify a reference, website, or brief description.\"\nbs-ww_temperature,Optional,\"Temperature of the wastewater sample at the time of sampling in Celsius, e.g., 25.\"\nbs-ww_total_suspended_solids,Optional,\"Total concentration of solids in raw wastewater influent sample including a wide variety of material, such as silt, decaying plant and animal matter in milligrams per liter, e.g., 500.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Virus.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Host\",\"At least one required: Group \"\"Host\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lab_host,\"At least one field required. Group: At least one required: Group \"\"Host\",\"At least one required: Group \"\"Host\"\". Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-genotype,Optional,observed genotype\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-passage_history,Optional,Number of passages and passage method\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-strain,Optional,microbial or eukaryotic strain name\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.cmt.schema_template.csv", "content": "column_name,required_column,description\n((?:cmt-StructuredComment)(?:Prefix|Suffix)),Required,\"Structured comment keyword. For FLU use \"\"FluData\"\", HIV use \"\"HIV-DataBaseData\"\", and for COV and other organisms use \"\"Assembly-Data\"\".\"\nAssembly Method,Required,\"Structured comment keyword. For FLU use \"\"FluData\"\", HIV use \"\"HIV-DataBaseData\"\", and for COV and other organisms use \"\"Assembly-Data\"\".\"\n", "type": "text"}, {"name": "templates/config.genbank.genbank.flu.src.schema_template.csv", "content": "column_name,required_column,description\nsrc-Altitude,Optional,Altitude in metres above or below sea level of where the sample was collected.\nsrc-Bio_material,Optional,\"An identifier for the biological material from which the nucleotide sequence was obtained, with optional institution code and collection code for the place where it is currently stored. This should be provided using the following format 'institution-code:collection-code:material_id'. material_id is mandatory, institution-code and collection-code are optional; institution-code is mandatory when collection-code is present. This qualifier should be used to annotate the identifiers of material in biological collections which include zoos and aquaria, stock centers, seed banks, germplasm repositories and DNA banks.\"\nsrc-Breed,Optional,The named breed from which sequence was obtained (usually applied to domesticated mammals).\nsrc-Cell_line,Optional,Cell line from which sequence was obtained.\nsrc-Cell_type,Optional,Type of cell from which sequence was obtained.\nsrc-Clone,Optional,Name of clone from which sequence was obtained.\nsrc-Collected_by,Optional,Name of person who collected the sample.\nsrc-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\".\"\nsrc-Cultivar,Optional,Cultivated variety of plant from which sequence was obtained.\nsrc-Culture_collection,Optional,\"Institution code and identifier for the culture from which the nucleotide sequence was obtained, with optional collection code. This should be provided using the following format 'institution-code:collection-code:culture-id'. culture-id and institution-code are mandatory. This qualifier should be used to annotate live microbial and viral cultures, and cell lines that have been deposited in curated culture collections.\"\nsrc-Dev_stage,Optional,Developmental stage of organism.\nsrc-Ecotype,Optional,The named ecotype (population adapted to a local habitat) from which sequence was obtained (customarily applied to populations of Arabidopsis thaliana).\nsrc-Fwd_primer_name,Optional,name of forward PCR primer\nsrc-Fwd_primer_seq,Optional,nucleotide sequence of forward PCR primer\nsrc-Genotype,Optional,Genotype of the organism.\nsrc-Haplogroup,Optional,Name for a group of similar haplotypes that share some sequence variation\nsrc-Haplotype,Optional,Haplotype of the organism.\nsrc-Host,Required,\"When the sequence submission is from an organism that exists in a symbiotic, parasitic, or other special relationship with some second organism, the 'host' modifier can be used to identify the name of the host species.\"\nsrc-Isolate,Required,Identification or description of the specific individual from which this sequence was obtained.\nsrc-Isolation-source,Optional,Describes the local geographical source of the organism from which the sequence was obtained.\nsrc-Lab_host,Optional,Laboratory host used to propagate the organism from which the sequence was obtained.\nsrc-Lat_Lon,Optional,\"Latitude and longitude, in decimal degrees, of where the sample was collected.\"\nsrc-Note,Optional,Any additional information that you wish to provide about the sequence.\nsrc-Rev_primer_name,Optional,name of reverse PCR primer\nsrc-Rev_primer_seq,Optional,nucleotide sequence of reverse PCR primer\nsrc-Segment,Optional,name of viral or phage segment sequenced\nsrc-Serotype,Optional,See Serogroup\nsrc-Serovar,Optional,See Serogroup\nsrc-Sex,Optional,Sex of the organism from which the sequence was obtained.\nsrc-Specimen_voucher,Optional,\"An identifier of the individual or collection of the source organism and the place where it is currently stored, usually an institution. This should be provided using the following format 'institution-code:collection-code:specimen-id'. specimen-id is mandatory, collection-code is optional; institution-code is mandatory when collection-code is provided. Examples: 99-SRNP UAM:Mamm:52179 personal collection:Joe Smith:99-SRNP AMCC:101706\"\nsrc-Strain,Required,Strain of organism from which sequence was obtained.\nsrc-Sub_species,Optional,Subspecies of organism from which sequence was obtained.\nsrc-Tissue_lib,Optional,Tissue library from which the sequence was obtained.\nsrc-Tissue_type,Optional,Type of tissue from which sequence was obtained.\nsrc-Variety,Optional,Variety of organism from which sequence was obtained.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.schema_template.csv", "content": "column_name,required_column,description\nsequence_name,Required,Sequence identifier used in fasta file. This is used to create the fasta file for Genbank by updating the sequence name in your fasta file to reflect the sample name for the specified database.\ngb-sample_name,Required,Identifier name used for GenBank. Max length is 50 characters.\ngb-fasta_definition_line_modifiers,Optional,\"NCBI fasta definition line modifiers can be added here. As many modifiers as you like can be added, but each must bounded by a set of brackets. Some of the available keywords are listed at \"\"https://www.ncbi.nlm.nih.gov/genbank/mods_fastadefline/\"\".\"\ngb-title,Optional,\"Optional internal field for how the GenBank submission should be named when viewed from the NCBI submission portal, . If not provided, when performing submissions <--submission_name> with the suffix \"\"-GB\"\" will be used instead.\"\ngb-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.src.schema_template.csv", "content": "column_name,required_column,description\nsrc-Altitude,Optional,Altitude in metres above or below sea level of where the sample was collected.\nsrc-Bio_material,Optional,\"An identifier for the biological material from which the nucleotide sequence was obtained, with optional institution code and collection code for the place where it is currently stored. This should be provided using the following format 'institution-code:collection-code:material_id'. material_id is mandatory, institution-code and collection-code are optional; institution-code is mandatory when collection-code is present. This qualifier should be used to annotate the identifiers of material in biological collections which include zoos and aquaria, stock centers, seed banks, germplasm repositories and DNA banks.\"\nsrc-Breed,Optional,The named breed from which sequence was obtained (usually applied to domesticated mammals).\nsrc-Cell_line,Optional,Cell line from which sequence was obtained.\nsrc-Cell_type,Optional,Type of cell from which sequence was obtained.\nsrc-Clone,Optional,Name of clone from which sequence was obtained.\nsrc-Collected_by,Optional,Name of person who collected the sample.\nsrc-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\".\"\nsrc-Cultivar,Optional,Cultivated variety of plant from which sequence was obtained.\nsrc-Culture_collection,Optional,\"Institution code and identifier for the culture from which the nucleotide sequence was obtained, with optional collection code. This should be provided using the following format 'institution-code:collection-code:culture-id'. culture-id and institution-code are mandatory. This qualifier should be used to annotate live microbial and viral cultures, and cell lines that have been deposited in curated culture collections.\"\nsrc-Dev_stage,Optional,Developmental stage of organism.\nsrc-Ecotype,Optional,The named ecotype (population adapted to a local habitat) from which sequence was obtained (customarily applied to populations of Arabidopsis thaliana).\nsrc-Fwd_primer_name,Optional,name of forward PCR primer\nsrc-Fwd_primer_seq,Optional,nucleotide sequence of forward PCR primer\nsrc-Genotype,Optional,Genotype of the organism.\nsrc-Haplogroup,Optional,Name for a group of similar haplotypes that share some sequence variation\nsrc-Haplotype,Optional,Haplotype of the organism.\nsrc-Host,Required,\"When the sequence submission is from an organism that exists in a symbiotic, parasitic, or other special relationship with some second organism, the 'host' modifier can be used to identify the name of the host species.\"\nsrc-Isolate,Required,Identification or description of the specific individual from which this sequence was obtained.\nsrc-Isolation-source,Optional,Describes the local geographical source of the organism from which the sequence was obtained.\nsrc-Lab_host,Optional,Laboratory host used to propagate the organism from which the sequence was obtained.\nsrc-Lat_Lon,Optional,\"Latitude and longitude, in decimal degrees, of where the sample was collected.\"\nsrc-Note,Optional,Any additional information that you wish to provide about the sequence.\nsrc-Rev_primer_name,Optional,name of reverse PCR primer\nsrc-Rev_primer_seq,Optional,nucleotide sequence of reverse PCR primer\nsrc-Segment,Optional,name of viral or phage segment sequenced\nsrc-Serotype,Optional,See Serogroup\nsrc-Serovar,Optional,See Serogroup\nsrc-Sex,Optional,Sex of the organism from which the sequence was obtained.\nsrc-Specimen_voucher,Optional,\"An identifier of the individual or collection of the source organism and the place where it is currently stored, usually an institution. This should be provided using the following format 'institution-code:collection-code:specimen-id'. specimen-id is mandatory, collection-code is optional; institution-code is mandatory when collection-code is provided. Examples: 99-SRNP UAM:Mamm:52179 personal collection:Joe Smith:99-SRNP AMCC:101706\"\nsrc-Strain,Optional,Strain of organism from which sequence was obtained.\nsrc-Sub_species,Optional,Subspecies of organism from which sequence was obtained.\nsrc-Tissue_lib,Optional,Tissue library from which the sequence was obtained.\nsrc-Tissue_type,Optional,Type of tissue from which sequence was obtained.\nsrc-Variety,Optional,Variety of organism from which sequence was obtained.\n", "type": "text"}, {"name": "templates/config.seqsender.seqsender.schema_template.csv", "content": "column_name,required_column,description\norganism,Required,The most descriptive organism name for the samples.\nauthors,Required,\"Citing authors. List of Last, First Middle, suffix separated by a semicolon \"\";\"\" E.g.: \"\"Baker, Howard Henry, Jr.; Powell, Earl Alexander, III.;\"\"\"\ncollection_date,Required,\"Collection date for sample. Must be in a valid format based on ISO 8601: \"\"YYYY-MM-DD\"\", \"\"YYYY-MM\"\", or \"\"YYYY\"\". Time is not supported.\"\nbioproject,Optional,NCBI BioProject ID.\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.biosample.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Sample name used for BioSample submission.\nbiosample_status,Required,Current status of the BioSample submission.\nbiosample_accession,Required,Sample accession ID used to identify BioSample submission NCBI.\nbiosample_message,Required,\"If there is a message tied to the sample submitted to BioSample, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.genbank.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\ngb-sample_name,Required,Sample name used for GenBank submission.\ngenbank_status,Required,Current status of the GenBank submission.\ngenbank_accession,Required,Sample accession ID used to identify GenBank submission NCBI.\ngenbank_message,Required,\"If there is a message tied to the sequence submitted to GenBank, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.sra.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\nsra-sample_name,Required,Sample name used for SRA submission.\nsra_status,Required,Current status of the SRA submission.\nsra_accession,Required,Sample accession ID used to identify SRA submission NCBI.\nsra_message,Required,\"If there is a message tied to the sequence submitted to SRA, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.sra.sra.schema_template.csv", "content": "column_name,required_column,description\nsra-sample_name,Required,Identifier name used for SRA. Max length is 50 characters. Name must be unique from BioSample/Genbank submission.\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters. Required if submitting to SRA.\nsra-file_location,Required,\"Location of raw reads files. Options: \"\"local\"\" or \"\"cloud\"\".\"\nsra-file_1,Required,\"All file names must be unique and not contain any sensitive information. Files can be compressed using gzip or bzip2, and may be submitted in a tar archive but archiving and/or compressing your files is not required. Do not use zip! If files are stored in the cloud, provide the full cloud url. If files are stored locally, if files are stored in the folder \"\"<--submission_dir>/raw_reads/\"\", then just the file name is required; otherwise, provide the full file path for the raw read.\"\nsra-file_#,Optional,\"Repeatable column, replace the \"\"#\"\" with the file number for each file associated with the sample. (i.e. If you had 4 separate raw reads files associated with one sample, then you would have 4 columns named: \"\"sra-file_1\"\", \"\"sra-file_2\"\", \"\"sra-file_3\"\", and \"\"sra-file_4\"\".) All file names must be unique and not contain any sensitive information. Files can be compressed using gzip or bzip2, and may be submitted in a tar archive but archiving and/or compressing your files is not required. Do not use zip! If files are stored in the cloud, provide the full cloud url. If files are stored locally, if files are stored in the folder \"\"<--submission_dir>/raw_reads/\"\", then just the file name is required; otherwise, provide the full file path for the raw read.\"\nsra-library_name,Optional,Short unique identifier for sequencing library.\nsra-loader,Optional,\"SRA loader selection. If NCBI says your SRA files need to be uploaded with a certain loader, you can select it here.\"\nsra-library_strategy,Required,The sequencing technique intended for the library.\nsra-library_source,Required,The type of source material that is being sequenced.\nsra-library_selection,Required,The method used to select and/or enrich the material being sequenced.\nsra-library_layout,Required,\"Whether to expect SINGLE or PAIRED end reads. Options: \"\"single\"\" or \"\"paired\"\".\"\nsra-platform,Optional,Instrument platform.\nsra-instrument_model,Required,Instrument model used for sequencing.\nsra-design_description,Optional,Brief description of materials/methods used for creating sequencing library.\nsra-title,Optional,\"Optional internal field for how the SRA submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-SRA\"\" will be used instead.\"\nsra-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}] \ No newline at end of file +[{"name": "app.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n###################### CSS #######################\nimport pandas as pd\nfrom shinyswatch import theme\nimport shiny_tools\nfrom index import index_body\nfrom setup import setup_body\nfrom about import about_body\nfrom prerequisites import prerequisites_body\nfrom my_first_submission import first_submission_body\nimport pathlib\nimport yaml\nfrom yaml import SafeDumper\n\nterminal_css = \"\"\nyaml_css = \"background-color: #F0F0F0;white-space: nowrap; font-size: 20px ;margin-top:-15px;font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;-webkit-user-select: none; -ms-user-select: none; user-select: none;\"\n############ HEADER #######################\nheader = (\n ui.card_header(\n ui.HTML(\n \"\"\"

    Beta Version: 1.5.0 This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!

    \"\"\"\n )\n ),\n)\n############## FOOTER #######################\nfooter = (\n ui.card_footer(\n ui.HTML(\n \"\"\"

    General Disclaimer: This repository was created for use by CDC programs to collaborate on public health related projects in support of the CDC mission. GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.

    \"\"\"\n ),\n ),\n)\n############### FUNCTIONS #########################\nui.input_checkbox_group(\n \"select_databases\",\n \"Select Database(s):\",\n {\n \"GenBank\": ui.span(\"GenBank\"),\n \"SRA\": ui.span(\"SRA\"),\n \"BioSample\": ui.span(\"BioSample\"),\n },\n),\n\n####################### INSTALLATION PAGE ###########################\n#### LOCAL INSTALLATION\nlocal_installation_content = [\n shiny_tools.software_requirements(\"Local\"),\n ui.HTML(\n \"\"\"\n

    Micromamba Installation

    \n

    Here we recommend using micromamba to set up a virtual environment to run seqsender. Micromamba is a tiny, statically linked C++ reimplementation of mamba which is an alternative to conda. The tool works as a standalone package manager that supports a subset of all mamba or conda commands, but it also has its own separate command line interfaces. For more information, visit micromamba documentation.

    \n

    To manually install, download and unzip the executable from the official conda-forge package to your $HOME directory using tar.

    \n
    cd $HOME
    \nLINUX\n
    # Linux Intel (x86_64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba\n# Linux ARM64:\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-aarch64/latest | tar -xvj bin/micromamba\n# Linux Power:\ncurl -Ls https://micro.mamba.pm/api/micromamba/linux-ppc64le/latest | tar -xvj bin/micromamba
    \nmacOS\n
    # macOS Intel (x86_64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba\n# macOS Silicon/M1 (ARM64):\ncurl -Ls https://micro.mamba.pm/api/micromamba/osx-arm64/latest | tar -xvj bin/micromamba
    \n

    After the extraction is completed, you can find the executable at $HOME/bin/micromamba

    \n
      \n
    • To quickly use micromamba, you can simply run
    • \n
    \n
    export MAMBA_ROOT_PREFIX="$HOME/micromamba"\neval "$($HOME/bin/micromamba shell hook -s posix)"
    \n
      \n
    • To persist using micromamba, you can append the following script to your .bashrc (or .zshrc)
    • \n
    \n
    # >>> mamba initialize >>>\nexport MAMBA_EXE="$HOME/bin/micromamba";\nexport MAMBA_ROOT_PREFIX="$HOME/micromamba";\n__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"\nif [ $? -eq 0 ]; then\n    eval "$__mamba_setup"\nelse\n    alias micromamba="$MAMBA_EXE"  # Fallback on help from mamba activate\nfi\nunset __mamba_setup\n# <<< mamba initialize <<<
    \n
      \n
    • To check the current version of micromamba
    • \n
    \n
    micromamba --version\n1.5.6
    \n

    Set up a micromamba environment

    \n
      \n
    1. Clone this repository to your $HOME directory
    2. \n
    \n
    cd $HOME\ngit clone https://github.com/CDCgov/seqsender.git
    \n
      \n
    1. CD to seqsender folder where the env.yaml file is stored. Let\u2019s create a virtual environment named mamba that contains all dependencies needed to run seqsender from the source file.
    2. \n
    \n
    cd seqsender\nmicromamba create --name seqsender --file env.yaml
    \n
      \n
    1. Activate the named environment \u2013 seqsender
    2. \n
    \n
    micromamba activate seqsender
    \n

    Run seqsender within the mamba environment

    \n
    python seqsender.py --help
    \"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Local\"),\n ui.HTML(\n \"\"\"\n

    To see the arguments required for each command, for example, the submit command, run

    \n
    python seqsender.py submit --help
    \n\"\"\"\n ),\n shiny_tools.seqsender_submit_help_output_msg(\"Local\"),\n]\n#### DOCKER INSTALLATION\ndocker_installation_content = [\n shiny_tools.software_requirements(\"Docker\"),\n ui.HTML(\n \"\"\"\n

    Clone seqsender repo to your $HOME directory and navigate to the repo

    \n
    cd $HOME\ngit clone https://github.com/CDCgov/seqsender.git\ncd seqsender
    \"\"\"\n ),\n ui.navset_card_pill(\n ui.nav_panel(\n \"Docker-Build\",\n [\n ui.HTML(\n \"\"\"\n

    In the directory where the Dockerfile is stored, build docker image

    \n
    docker build -t seqsender:latest .
    \n

    -t: add a tag to an image, e.g.\u00a0seqsender:1.0.0 or seqsender:latest

    \n
    \n

    After the build is complete, you can check if the image is created successfully.

    \n
    docker images
    \"\"\"\n ),\n ui.card(\n ui.HTML(\n \"\"\"\ndocker images
    \nREPOSITORY TAG |  IMAGE ID |  CREATED | SIZE
    \nseqsender latest d9e2578d2211 2 weeks ago 581GB\n\"\"\"\n ),\n style=terminal_css,\n ),\n ui.HTML(\n \"\"\"\n

    Run seqsender container

    \n
    docker run \\\n-v $HOME:/data \\\n-t -d seqsender:latest \\\n--name seqsender
    \n

    -t: allocate a pseudo-tty
    -d: run the container in detached mode
    -v: mount data files from host directory to container directory [host_div]:[container_dir]. By exposing the host directory to docker container, docker will be able to access data files within that mounted directory and use it to fire up the seqsenderworkflows. NOTE: Here we are mounting the local $HOME directory to /data directory inside the container.
    --name: give an identity to the container

    \n

    For more information about the Docker syntax, see Docker run reference

    \"\"\"\n ),\n ],\n ),\n ui.nav_panel(\"Docker-Compose\",\n ui.h2(\"Update docker-compose.yaml for your local storage\"),\n ui.p(ui.strong(\"Note: \"), ui.code(\"source\"), \" is the storage location of your local machine. This location will be mapped to \", ui.code(\"/data\"), \" directory inside of the container. Here we are mounting the local variable \", ui.code(\"$HOME\"), \" directory to \", ui.code(\"/data\"), \" inside of the container. Change the value \", ui.code(\"$HOME\"), \" to reflect your local storage system.\"),\n ui.card(ui.HTML(\n \"\"\"\nversion: \"3.9\"
    \nx-data-volumes:
    \n  &data-volume
    \n  type: bind
    \n  source: $HOME
    \n  target: /data
    \n
    \nservices:
    \n  seqsender:
    \n    container_name: seqsender
    \n    image: seqsender:latest
    \n    build:
    \n      context: .
    \n      dockerfile: Dockerfile
    \n      args:
    \n        - micromamba_version=1.5.3
    \n    restart: always
    \n    volumes:
    \n      - *data-volume
    \n    command: tail -f /dev/null
    \n
    \"\"\"\n ),\n style=terminal_css,\n ),\n ui.h2(\"Start \", ui.code(\"seqsender\"), \" container\"),\n ui.card(\n ui.p(ui.code(\"docker-compose up -d\")),\n style=terminal_css,\n ),\n ui.p(\"Running docker-compose with the flag \", ui.code(\"-d\"), \" runs the container in detached mode, allowing the container to continue to run in the background. For more information refer to \", ui.a(\"docker-compose documentation\", href=\"https://docs.docker.com/reference/cli/docker/compose/up/\"), \".\"),\n ),\n id=\"docker_options\",\n ),\n ui.HTML(\n \"\"\"\n

    Check if the container is created successfully

    \n
    docker container ps
    \n\"\"\"\n ),\n ui.card(\n ui.HTML(\n \"\"\"\ndocker container ps
    \nCONTAINER ID |  | IMAGE |  |  COMMAND |  | CREATED |  STATUS | PORTS | NAMES
    \nb37b6b19c4e8 seqsender:latest "/bin/bash" 5 hours ago Up 5 hours |  | seqsender\n\"\"\"\n ),\n style=terminal_css,\n ),\n ui.HTML(\n \"\"\"\n

    See a list of commands in seqsender container

    \n
    docker exec -it seqsender bash seqsender-kickoff --help
    \n

    -t: allocate a pseudo-tty
    -i: keep STDIN open even if not attached
    -h, --help: show help messages and exit

    \n\"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Docker\"),\n]\n#### SINGULARITY INSTALLATION\nsingularity_installation_content = [\n shiny_tools.software_requirements(\"Singularity\"),\n ui.HTML(\n \"\"\"\n

    Convert seqsender Docker image into a Singularity image

    \n

    There is a seqsender Docker image already built and stored on our DockerHub registry: cdcgov/seqsender-dev:latest. You can directly pull the Docker Image down from the registry, convert it into a Singularity image, and store it in a destination of your choice.

    \n
    singularity build ~/singularity/seqsender.sif docker://cdcgov/seqsender-dev:latest
    \n

    After the Singularity image is built successfully, we can go ahead and use it to run seqsender

    \n

    Here is the command that shows the help messages of seqsender

    \n
    mkdir ~/singularity\nsingularity exec ~/singularity/seqsender.sif seqsender-kickoff --help
    \n\"\"\"\n ),\n shiny_tools.seqsender_help_output_msg(\"Singularity\"),\n ui.HTML(\n \"\"\"\n

    To see the arguments required for each command, for example, the submit command, run

    \n
    singularity exec ~/singularity/seqsender.sif seqsender-kickoff submit --help
    \n\"\"\"\n ),\n shiny_tools.seqsender_submit_help_output_msg(\"Singularity\"),\n]\ninstallation_body = [\n ui.h2(\"Installation\"),\n ui.navset_tab(\n ui.nav_panel(\"Local\", local_installation_content),\n ui.nav_panel(\"Docker\", docker_installation_content),\n ui.nav_panel(\"Singularity\",singularity_installation_content),\n id=\"installation_tab\",\n ),\n]\n\n\n####################### TEST SUBMISSIONS PAGE ##############################\nuser_data_content = (\n [\n ui.p(\"Content Panel A\"),\n ],\n)\n\nexample_data_content = (\n [\n ui.br(),\n ui.p(\"Access the example data by:\"),\n ui.p(\n \"First, use the \",\n ui.code(\"prep\"),\n \" command to generate all the necessary files for submission. This step is not required for submitting to databases, as this command is ran when running the \",\n ui.code(\"submit\"),\n \" command. However, it is helpful to test/debug your submission without submitting to a database and allows you to visualize all of the files generated for submission.\",\n ),\n shiny_tools.seqsender_example_command(\"local\", \"prep\", \"\"),\n ui.p(\n \"After you've validated that your data is being generated correctly using command \",\n ui.code(\"prep\"),\n \", you can now make a test submission to the database. Database submissions are made using the \",\n ui.code(\"submit\"),\n \" command, be sure to always include the flag \",\n ui.code(\"--test\"),\n \" when submitting test submissions.\",\n ),\n shiny_tools.seqsender_example_command(\"local\", \"submit\", \"--test\"),\n ui.p(\n \"Now that your submission has been made you can check its submission progress using the \",\n ui.code(\"check_submission_status\"),\n \" command.\",\n ),\n ],\n)\n\ntesting_body = [\n ui.h2(\"Test Submissions\"),\n ui.p(\n \"Test submissions can be made with either the provided test files or your own data.\"\n ),\n ui.navset_tab(\n ui.nav_panel(\"I have my own data\", user_data_content),\n ui.nav_panel(\"I don't have my own data\", example_data_content),\n id=\"testing_tab\",\n selected=\"I don't have my own data\",\n ),\n]\n\n####################### OUTPUT FILE PAGE ###################\n\noutput_body = [\n ui.h2(\"SeqSender Output Files\"),\n ui.p(\"Output files described below are split into two categories: \", ui.strong(\"SeqSender output\"), \" or \", ui.strong(\"database specific\"), \" which lists all the files that can appear in your database submission directory (\", ui.code(\"<--submission_dir>/<--submission_name>/submission_files/\"), \"). Files generated will also change for each directory based on the SeqSender submission process for the database, metadata provided, and database submission response files. \"),\n ui.h4(\"SeqSender script output:\"),\n ui.hr(),\n ui.h6(\"submission_log.csv\"),\n ui.tags.ul(\n ui.p(\"The \", ui.strong(\"submission_log.csv\"), \" is used by Seqender to track the submission status of each of your submissions made. SeqSender updates each \", ui.strong(\"Submission_Name\"), \" that does not have a complete \", ui.strong(\"Submission_Status\"), \" by loading the relevant \", ui.strong(\"Submission_Directory\"), \" and \", ui.strong(\"Config_File\"), \".\"),\n ui.tags.ul(\n shiny_tools.file_output_column_info(column_name=\"Submission_Name\",\n description=(\"Unique \", ui.code(\"--submission_name\"), \" used when making your submission via the \", ui.code(\"submit\"), \" command. Used by SeqSender to locate the currect submission directory and to name your batch submission during the upload process.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Organism\",\n description=(\"Submission organism option \", ui.code(\"--organism\"), \" when making your submission which can enable certain additional submission options.\"),\n controlled_fields=[((ui.code(\"FLU\"), \"|\", ui.code(\"COV\")), (\"For \", ui.strong(\"Influenza Virus A\"), \" or \", ui.strong(\"Severe Acute Respiratory Syndrome Coronavirus 2\"), \", it enables GenBank (via FTP) as submission options.\")),\n ((ui.code(\"OTHER\")), (\"For any organism without additional submission options. It provides access to the default available databases: BioSample, SRA, and GenBank (table2asn via email).\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Database\",\n description=\"Database being submitted to.\",\n controlled_fields=[((ui.code(\"BIOSAMPLE\"), \"|\", ui.code(\"SRA\"), \"|\", ui.code(\"GENBANK-TBL2ASN\"), \"|\", ui.code(\"GENBANK-FTP\")), (\"Specifies the database being submitted to. For GenBank, it also includes the submission method for table2asn as \\\"-TBL2ASN\\\" or FTP as \\\"-FTP\\\".\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Type\",\n description=\"Whether the submission you're making is live or a test.\",\n controlled_fields=[((ui.code(\"TEST\"), \"|\", ui.code(\"PRODUCTION\")), (\"Test or live (production) submission.\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Date\",\n description=(\"Date submission was started with the SeqSender \", ui.code(\"submit\"), \" command.\"),\n controlled_fields=[((ui.code(\"YYYY-MM-DD\")), (\"ISO-8601 standard date format. (i.e. 2024-01-01, 2024-12-31)\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Status\",\n description=(\"Current status of the submission to the database specified. \\\"GENBANK-TBL2ASN\\\" uses \", ui.strong(\"EMAILED\"), \" instead of \", ui.strong(\"PROCESSED\"), \" to designate the submission is complete.\"),\n controlled_fields=[((ui.code(\"SUBMITTED\")), (\"Submission has been uploaded to NCBI database.\")),\n ((ui.code(\"CREATED\")), (\"NCBI is currently loading the submission files.\")),\n ((ui.code(\"QUEUED\")), (\"NCBI has queued your submission for processing.\")),\n ((ui.code(\"PROCESSING\")), (\"Submission is currently processing for NCBI database. When the \", ui.code(\"submission_status\"), \" command is ran again it will attempt to submit the rest of the samples.\")),\n ((ui.code(\"FAILED\")), (\"Submission failed processing for NCBI database.\")),\n ((ui.code(\"PROCESSED\")), (\"Submission has been successfully uploaded to NCBI.\")),\n ((ui.code(\"ERROR\")), (\"SeqSender failed to process report for NCBI database.\")),\n ((ui.code(\"WAITING\")), (\"Submission is waiting on other submissions to complete processing, to correctly link information.\")),\n ((ui.code(\"DELETED\")), (\"NCBI has deleted your submission. This could be because your submission remained errored for too long without resolution or you requested to have the submission removed.\")),\n ((ui.code(\"RETRIED\")), (\"NCBI has attempted retrying processing of your submission.\")),\n ((ui.code(\"VALIDATED\")), (\"SeqSender has used table2asn to validate that your sqn file is correct.\")),\n ((ui.code(\"EMAILED\")), (\"SeqSender has successfully emailed your table2asn submission to upload it to GenBank.\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_ID\",\n description=(\"NCBI submission ID tied to the \", ui.code(\"Submission_Name\"), \".\"),\n controlled_fields=[((ui.code(\"PENDING\"), \"|\", ui.code(\"SUB#\"), \"|\", ui.code(\"SUBMITTED\")), (\"Until submission ID is generated it will use \", ui.strong(\"PENDING\"), \".\"))]\n ),\n shiny_tools.file_output_column_info(column_name=\"Submission_Directory\",\n description=(\"Full file path for the specified \", ui.strong(\"Submission_Name\"), \", \", ui.strong(\"Database\"), \", submission directory.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Config_File\",\n description=(\"Full file path for the \", ui.code(\"--config_file\"), \" input provided during the \", ui.code(\"submit\"), \" command.\"),\n controlled_fields=None\n ),\n shiny_tools.file_output_column_info(column_name=\"Update_Date\",\n description=(\"Date submission was last updated with SeqSender via the \", ui.code(\"submission_status\"), \" command.\"),\n controlled_fields=[((ui.code(\"YYYY-MM-DD\")), (\"ISO-8601 standard date format. (i.e. 2024-01-01, 2024-12-31)\"))]\n ),\n ),\n ),\n ui.h6(\"submission_status_report.csv\"),\n ui.tags.ul(\n ui.p(\"The \", ui.strong(\"submission_status_report.csv\"), \" is used by SeqSender to record/link the samples submitted to each database. When SeqSender is linking accessions between NCBI databases, it will use this file to retrieve the recorded accessions and update the relevant submisison files.\"),\n ui.tags.ul(\n shiny_tools.file_output_column_info(column_name=\"bs-sample_name\",\n description=(\"Sample name used for submission to BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_status\",\n description=(\"Status of the sample submitted to BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_accession\",\n description=(\"Accession assigned to sample by BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"biosample_message\",\n description=(\"Message related to sample from BioSample.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra-sample_name\",\n description=(\"Sample name used for submission to SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_status\",\n description=(\"Status of the sample submitted to SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_accession\",\n description=(\"Accession assigned to sample by SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"sra_message\",\n description=(\"Message related to sample from SRA.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"gb-sample_name\",\n description=(\"Sample name used for submission to GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_status\",\n description=(\"Status of the sample submitted to GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_accession\",\n description=(\"Accession assigned to sample by GenBank.\"),\n controlled_fields=None,\n ),\n shiny_tools.file_output_column_info(column_name=\"genbank_message\",\n description=(\"Message related to sample from GenBank.\"),\n controlled_fields=None,\n ),\n ),\n ),\n ui.hr(),\n ui.h4(\"BioSample Directory:\"),\n ui.hr(),\n ui.h6(\"metadata.tsv\"),\n ui.tags.ul(\n ui.p(\"BioSample submission metadata file. Can be used to submit your BioSample data to NCBI via their submission website instead of FTP.\"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by BioSample regarding the status of the current submission and sample information.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"BioSample submission xml file. Used by SeqSender to submit your BioSample data to NCBI via their FTP submission option.\"),\n ),\n ui.hr(),\n ui.h4(\"SRA Directory:\"),\n ui.hr(),\n ui.h6(\"metadata.tsv\"),\n ui.tags.ul(\n ui.p(\"SRA submission metadata file. Can be used to submit your SRA data to NCBI via their submission website instead of FTP.\"),\n ),\n ui.h6(\"raw_reads_location.txt\"),\n ui.tags.ul(\n ui.p(\"SeqSender file, used to record the location of all raw reads files to be uploaded to SRA via FTP.\"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by SRA regarding the status of the current submission and sample information.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"SRA submission xml file. Used by SeqSender to submit your SRA data to NCBI via FTP.\"),\n ),\n ui.hr(),\n ui.h4(\"GenBank Directory:\"),\n ui.hr(),\n ui.h6(\"AccessionReport.tsv\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. Contains the status of each sample and its corrsponding accession..\"),\n ),\n ui.h6(\"authorset.sbt\"),\n ui.tags.ul(\n ui.p(\"GenBank submission file for author/organization information.\"),\n ),\n ui.h6(\"comment.cmt\"),\n ui.tags.ul(\n ui.p(\"Optional tab-delimited, GenBank submission file. Contains additional sequencing and assembly information.\"),\n ),\n ui.h6(\"email.txt\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. This is a copy of the email sent by GenBank to every member of your group account after your GenBank sequences have been \", ui.strong(\"PROCESSED\"), \".\"),\n ),\n ui.h6(\"flatfile.txt\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP output file. This is a copy of the annotated sample GenBank record, in GenBank flatfile format. This is how your sample looks like live on GenBank. \"),\n ),\n ui.h6(\"report.xml\"),\n ui.tags.ul(\n ui.p(\"Report generated by GenBank regarding the status of the current submission.\"),\n ),\n ui.h6(\"seq-edit-report.html\"),\n ui.tags.ul(\n ui.p(\"Optional GenBank FTP output file. If your samples were automatically modified by GenBank during the submission process to adhere to GenBank standards then the changes to each sample will be listed here. This does not mean your sample failed to upload, this usually is to just a minor typo or incorrect syntax. If your config file field \", ui.code(\"GenBank_Auto_Remove_Failed_Samples\"), \" is set to \", ui.code(\"True\"), \" then the samples automatically removed by GenBank for failing to meet their submission criteria will also be listed here with the reason.\"),\n ),\n ui.h6(\"sequence.fsa\"),\n ui.tags.ul(\n ui.p(\"GenBank fasta file. Can be used to submit your data to GenBank via their website or it is used by SeqSender to upload via FTP or to create the tabl2asn sqn file.\"),\n ),\n ui.h6(\"source.src\"),\n ui.tags.ul(\n ui.p(\"GenBank metadata file. Can be used to submit your data to GenBank via their website or it is used by SeqSender to upload via FTP or to create the tabl2asn sqn file.\"),\n ),\n ui.h6(\"submission.xml\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP submission xml file. Used to identify submission information and GenBank submission zip file.\"),\n ),\n ui.h6(\".zip\"),\n ui.tags.ul(\n ui.p(\"GenBank FTP submission zip file. When submitting to GenBank via FTP, this contains all of your submission files: \", ui.strong(\"sequence.fsa\"), \", \", ui.strong(\"source.src\"), \", \", ui.strong(\"authorset.sbt\"), \", \", ui.strong(\"comment.cmt\"), \".\"),\n ),\n ui.h6(\".gff\"),\n ui.tags.ul(\n ui.p(\"Copy of gff file provided via command \", ui.code(\"--gff_file\"), \" when submitting via table2asn. It is used by SeqSender to create the table2asn sqn file.\"),\n ),\n]\n\n####################### COMMANDS PAGE ###################\n\ncommands_body = [\n ui.h2(\"SeqSender Commands\"),\n ui.p(\n \"This is a list of all available commands for seqsender, usage, and available options.\"\n ),\n ui.accordion(\n # Prep command\n shiny_tools.command_accordion_panel(\"prep\",\n description=\" command is used to generate all of the required files for submission to the databases specified. This command is not required for performing submissions, however, it is useful for visualizing your data before submission/troubleshooting submission issues.\"\n ),\n # Submit command\n shiny_tools.command_accordion_panel(\"submit\",\n description=\" command is used to generate all of the required files for submission to the databases specified. Then it performs batch upload to each database based on provided config file.\"\n ),\n # Submission status command\n shiny_tools.command_accordion_panel(\"submission_status\",\n description=\" command is used to update the progress of files submitted via the submit command. If database selection choices require submission in a sequential order then this command will also submit files when ready.\"\n ),\n # Load credentials command\n shiny_tools.command_accordion_panel(\"load_credentials\",\n description=\" command is used to load and encrypt your submission credentials into your submission config file. Provides a secret key to securely access your credentials for submission.\"\n ),\n # Test data command\n shiny_tools.command_accordion_panel(\"test_data\", description=\" command is used generate test data for seqsender, to be used for testing the prep and submit commands.\"),\n # Update biosample command\n shiny_tools.command_accordion_panel(\"update_biosample\", description=\" command is used to update biosample schema options based on available BioSample Packages.\"),\n # Update biosample command\n shiny_tools.command_accordion_panel(\"test_network_connection\", description=\" command is used to run a series of test network connections to troubleshoot submission issues.\"),\n # version command\n shiny_tools.command_accordion_panel(\"version\", description=\" command prints the current seqsender version.\"),\n ),\n]\n\n###################### FAQ PAGE ##########################\n\nfaq_body = [\n ui.h2(\"Frequently Asked Questions:\"),\n]\n\n######################## APP UI ##########################\n\napp_ui = ui.page_fluid(\n theme.lumen(),\n ui.head_content(ui.include_css(pathlib.Path(__file__).parent / \"seqsender.css\")),\n ui.page_navbar(\n ui.nav_panel(\"SeqSender\", index_body),\n ui.nav_panel(\"About\", about_body),\n ui.nav_panel(\"Installation\", installation_body),\n ui.nav_panel(\"Prerequisites\", prerequisites_body),\n ui.nav_panel(\"Submission Wizard\", setup_body),\n ui.nav_panel(\"My First Submission\", first_submission_body),\n ui.nav_panel(\"Output Files\", output_body),\n ui.nav_panel(\"Commands\", commands_body),\n # ui.nav_panel(\"FAQ\", faq_body),\n ui.nav_spacer(),\n ui.nav_control(ui.a(\"GitHub\", href=\"https://github.com/CDCgov/seqsender/\", target=\"_blank\")),\n selected=\"SeqSender\",\n header=header,\n footer=footer,\n ),\n)\n\n####################### SERVER #########################\nimport pathlib\n\ndir = pathlib.Path(__file__).parent\n\n@reactive.file_reader(dir / \"templates/config.seqsender.seqsender.schema_template.csv\")\ndef read_file():\n df = pd.read_csv(dir / \"templates/config.seqsender.seqsender.schema_template.csv\", index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n@reactive.file_reader(dir / \"templates/config.sra.sra.schema_template.csv\")\ndef read_sra_file():\n df = pd.read_csv(dir / \"templates/config.sra.sra.schema_template.csv\", index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n# Function to style metadata shiny index\ndef metadata_index_css(index):\n return \"background-color: #f0f0f0;\"\n\n# Function to style metadata shiny column headers\ndef metadata_database_css(column):\n if \"gb-\" in column:\n # Set color of GenBank table\n return \"background-color: #cce6ff;\"\n elif column.startswith(\"bs-\"):\n # Set color of BioSample table\n return \"background-color: #ffffb3;\"\n elif column.startswith(\"sra-\"):\n # Set color of SRA table\n return \"background-color: #ffcce6;\"\n else:\n return \"background-color: #dcdcdc;\"\n\n\ndef server(input, output, session):\n @reactive.Calc\n @reactive.file_reader(dir / \"templates/\")\n def read_biosample_file():\n df = pd.read_csv(dir / (\"templates/config.biosample.\" + input.BioSample_packages() + \"_template.csv\"), index_col = \"column_name\")\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n @reactive.file_reader(dir / \"templates/\")\n def read_genbank_file():\n df = pd.read_csv(dir / \"templates/config.genbank.genbank.schema_template.csv\", index_col = \"column_name\")\n if input.GenBank_schemas() == \"FLU\":\n src_df = pd.read_csv(dir / \"templates/config.genbank.genbank.flu.src.schema_template.csv\", index_col = \"column_name\")\n else:\n src_df = pd.read_csv(dir / \"templates/config.genbank.genbank.src.schema_template.csv\", index_col = \"column_name\")\n cmt_df = pd.DataFrame({\n \"column_name\": [\"cmt-StructuredCommentPrefix\", \"cmt-StructuredCommentSuffix\", \"cmt-Assembly Method\"],\n \"required_column\": [\"Required\", \"Required\", \"Required\"],\n \"description\": [\"Structured comment keyword. ONLY REQUIRED IF INCLUDING COMMENT FILE. For FLU use 'FluData', HIV use 'HIV-DataBaseData', and for COV and other organisms use 'Assembly-Data'.\",\n \"Structured comment keyword. ONLY REQUIRED IF INCLUDING COMMENT FILE. For FLU use 'FluData', HIV use 'HIV-DataBaseData', and for COV and other organisms use 'Assembly-Data'.\",\n \"ONLY REQUIRED IF INCLUDING COMMENT FILE. Process used to assemble genome.\"]\n })\n cmt_df = cmt_df.set_index(\"column_name\")\n df = pd.concat([df, src_df, cmt_df])\n df = df.fillna(\"\")\n df = df.transpose()\n return df\n\n @render.text\n def BioSample_Package_Name():\n return input.BioSample_packages()\n\n @reactive.effect\n @reactive.event(input.SRA_checkbox)\n def sra_submission_requires_biosample():\n if input.SRA_checkbox() == True and input.BioSample_checkbox() == False:\n with reactive.isolate():\n ui.update_checkbox(\"BioSample_checkbox\", value = True)\n\n @reactive.Calc\n def initialize_base_dataframe():\n return read_file()\n\n @reactive.Calc\n def initialize_biosample_dataframes():\n return read_biosample_file()\n\n @reactive.Calc\n def initialize_sra_dataframes():\n return read_sra_file()\n\n @reactive.Calc\n def initialize_genbank_dataframes():\n return read_genbank_file()\n\n @output\n @render.table\n @reactive.Calc\n def load_database_metadata_dataframe():\n database_df = initialize_base_dataframe()\n if input.GenBank_checkbox():\n genbank_df = initialize_genbank_dataframes()\n database_df = pd.concat([database_df, genbank_df], axis=1)\n if input.BioSample_checkbox():\n biosample_df = initialize_biosample_dataframes()\n database_df = pd.concat([database_df, biosample_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n if input.SRA_checkbox():\n sra_df = initialize_sra_dataframes()\n database_df = pd.concat([database_df, sra_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n database_df = database_df.loc[:, ~database_df.columns.duplicated()]\n database_df = (\n database_df.style.set_table_styles(\n [\n dict(\n selector=\"th\", props=[(\"border\", \"3px black solid !important\"), (\"white-space\", \"nowrap\"), (\"vertical-align\", \"top\")]\n ),\n dict(selector=\"ti\", props=[(\"background-color\", \"#DCDCDC\"), (\"vertical-align\", \"top\")]),\n dict(\n selector=\"td\", props=[(\"border\", \"1px black solid !important\"), (\"vertical-align\", \"top\")]\n ),\n ]\n )\n .applymap_index(metadata_database_css, axis=\"columns\")\n .applymap_index(metadata_index_css, axis=\"index\")\n )\n return database_df\n\n @reactive.Calc\n @render.download(filename=\"seqsender_config.yaml\")\n def download_config():\n config_file = initialize_config()\n yield yaml.safe_dump(config_file, sort_keys=False).replace(r\"''\", '')\n\n @reactive.Calc\n def initialize_config():\n config_file = {\"Submission\": {\n **({\"NCBI\":{\n \"Username\": input.ncbi_config_username() or \"\",\n \"Password\": \"\",\n \"Spuid_Namespace\": input.ncbi_config_spuid_namespace() or \"\",\n **({\"BioSample_Package\": input.BioSample_packages() or \"\"} if input.BioSample_checkbox() else {}),\n **({\"GenBank_Auto_Remove_Failed_Samples\": input.ncbi_config_auto_remove_genbank() or \"\"} if input.GenBank_checkbox() else {}),\n \"Publication_Title\": input.ncbi_config_publication_title() or \"\",\n \"Publication_Status\": input.ncbi_config_publication_status() or \"\",\n \"Specified_Release_Date\": input.ncbi_config_release_date() or \"\",\n \"Link_Sample_Between_NCBI_Databases\": input.ncbi_config_link_samples() or \"\",\n \"Add_Definition_Line_Accessions\": input.ncbi_config_fasta_def_lines() or \"\",\n \"Description\": {\n \"Organization\": {\n \"Role\": input.ncbi_config_role() or \"\",\n \"Type\": input.ncbi_config_type() or \"\",\n \"Name\": input.ncbi_config_org_name() or \"\",\n \"Address\": {\n \"Affil\": input.ncbi_config_affil() or \"\",\n \"Div\": input.ncbi_config_div() or \"\",\n \"Street\": input.ncbi_config_street() or \"\",\n \"City\": input.ncbi_config_city() or \"\",\n \"Sub\": input.ncbi_config_state() or \"\",\n \"Postal_Code\": input.ncbi_config_postal() or \"\",\n \"Country\": input.ncbi_config_country() or \"\",\n \"Email\": input.ncbi_config_email() or \"\",\n \"Phone\": input.ncbi_config_phone() or \"\",\n \"Submitter\": {\n \"Email\": input.ncbi_sub_email_one() or \"\",\n \"Alt_Email\": input.ncbi_sub_email_two() or \"\",\n \"Name\": {\n \"First\": input.ncbi_config_first_name() or \"\",\n \"Last\": input.ncbi_config_last_name() or \"\",\n }\n }\n }\n }\n }\n }} if input.BioSample_checkbox() or input.SRA_checkbox() or input.GenBank_checkbox() else {})\n }\n }\n config_file = {key: (None if value == \"\" else value) for key, value in config_file.items()}\n return config_file\n\n @reactive.Calc\n @render.download(filename=\"metadata_template.csv\")\n def download_metadata():\n database_df = initialize_base_dataframe()\n if input.GenBank_checkbox():\n genbank_df = initialize_genbank_dataframes()\n database_df = pd.concat([database_df, genbank_df], axis=1)\n if input.BioSample_checkbox():\n biosample_df = initialize_biosample_dataframes()\n database_df = pd.concat([database_df, biosample_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n if input.SRA_checkbox():\n sra_df = initialize_sra_dataframes()\n database_df = pd.concat([database_df, sra_df], axis=1)\n database_df.loc[\"required_column\", \"bioproject\"] = \"Required\"\n database_df = database_df.loc[:,~database_df.columns.duplicated()].copy()\n yield database_df.to_csv()\n\n\napp = App(app_ui, server)\n", "type": "text"}, {"name": "about.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\n\nabout_body = [\n ui.h2(\"About\"),\n ui.hr(),\n ui.p(\"SeqSender is a \", ui.strong(\"Python\"), \" program developed to aid the process of submitting genomic samples to public repositories. \",\n \"SeqSender \", ui.strong(\"simplifies\"), \" the submission process by creating all the necessary submission files for multiple databases from a single metadata file and fasta file. \",\n \"Based on the organism and database selection, SeqSender also \", ui.strong(\"validates\"), \" that the metadata your submitting meets the requirements of the database to preemptively catch submission errors. \",\n \"The tool can also be used to \", ui.strong(\"submit\"), \" your samples to each database while also linking the samples between the databases. \"),\n ui.p(\"SeqSender currently supports the databases from NCBI: \", ui.strong(\"BioSample, \"), ui.strong(\"SRA, \"),\n \" and \", ui.strong(\"GenBank \"), \".\"),\n ui.h2(\"Available Databases\"),\n ui.hr(),\n ui.h4(\"NCBI (National Center for Biotechnology Information)\"),\n ui.a(ui.h6(\"BioProject\"), href=\"https://www.ncbi.nlm.nih.gov/bioproject/\"),\n ui.tags.ul(\n ui.p(\"Is a collection of biological data that is tied to a research project. \",\n \"Used to collate your genomic sample data together across multiple databases. \",\n \"A BioProject provides a centralized location to identify/connect/share/describe the samples you are submitting to NCBI. \",\n \"A BioProject is \", ui.strong(\"required\"), \" if you're submitting to certain NCBI databases: \", ui.strong(\"Sequence Read Archive (SRA), Whole Genome Shotgun (WGS), \"), \"and \", ui.strong(\"Transcriptome Shotgun Assembly (TSA)\"), \".\",\n ),\n ),\n ui.a(ui.h6(\"Sequence Read Archive (SRA)\"), href=\"https://www.ncbi.nlm.nih.gov/sra\"),\n ui.tags.ul(\n ui.p(\"Is a database of high-throughput raw sequencing data and alignment information. \",\n \"The purpose of the database is to support reproducibility to faciliate new discoveries through data analysis. \",\n \"The SRA database is part of the \", ui.strong(\"International Nucleotide Sequence Database Collaboration (INSDC)\"), \", which is a joint effort between SRA, European Bioinformatics Institute (EBI), and the DNA Database of Japan (DDBJ) where data submitted to one is shared among them all. \",\n \"The database accepts submissions for all organisms, metagenomic, clinical studies, and environmental surveys. \",\n \"If your data contains human subjects/metagenomes, you should determine if your data is appropriate for public release, if not you might consider the NIH controlled access via dbGaP (the database of Genotypes and Phenotypes) instead. \",\n ),\n ui.p(\"SeqSender provides two options for uploading data to SRA, supports multiple files per sample, and supports all of the file type options that SRA supports which includes: BAM, SFF, HDF5, and FASTQ. \",\n \"Its easy to add your raw reads files when using SeqSender; using the metadata file in your SeqSender submission, just add the filepath('s) for each sample. \",\n \"For more SeqSender information, refer to the tab: \", ui.strong(\"My First Submission\"), \", to learn more about the SRA submission options or to the tab: \", ui.strong(\"Setup Wizard\"), \", to learn about the requirements for submitting to SRA. \",\n ),\n ),\n ui.a(ui.h6(\"BioSample\"), href=\"https://www.ncbi.nlm.nih.gov/biosample/\"),\n ui.tags.ul(\n ui.p(\"Is a database for storing descriptive information/metadata about biological samples you are submitting to other NCBI databases. \",\n \"BioSample provides broad categories for sample/study types called \", ui.a(ui.strong(\"Packages\"), href=\"https://www.ncbi.nlm.nih.gov/biosample/docs/packages/\"), \" which determine the metadata submission criteria. \",\n \"Including a BioSample submission with your data is a good way to provide revelant information regarding the individual location/organism your sample was collected from. \"\n ),\n ui.p(\"SeqSender supports and validates metadata for all current BioSample Packages. \",\n \"Place the chosen BioSample Package name inside your config file. \",\n \"For more information refer to the tab \", ui.strong(\"Setup Wizard\"), \", to select the available BioSample Packages and to get the subsequent required metadata. \",\n ),\n ),\n ui.a(ui.h6(\"GenBank\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/\"),\n ui.tags.ul(\n ui.p(\"Is a database for storing assembled nucleotide sequences and annotations. \",\n \"Each sample submitted will be annotated to include gene structure, coding regions, and other function elements related to your specimen. \",\n \"Samples uploaded to GenBank are also subject to meeting specific data integrity and quality requirements before they are accepted to GenBank. \",\n ),\n ui.p(\"SeqSender offers two methods for submitting data to GenBank. \",\n \"For Influenza Virus and COVID-19, SeqSender can upload your data via FTP, check submission status, and retrieve your GenBank accessions. \",\n \"For all other viruses, GenBank submissions will be made using \", ui.a(ui.strong(\"table2asn\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/table2asn/\"), \". \",\n \"The submission can then be manually uploaded to GenBank via NCBI's \", ui.a(ui.strong(\"submission portal\"), href=\"https://submit.ncbi.nlm.nih.gov/\"), \" or it can automatically email the submission to GenBank and CC you on it.\"\n ),\n ),\n]\n", "type": "text"}, {"name": "index.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n################## INDEX PAGE #######################\nindex_body = [\n ui.HTML(\n \"\"\"\n

    Overview

    \n

    seqsender is a Python program that is developed to automate the process of generating necessary submission files and batch uploading them to NCBI archives (such as BioSample, SRA, and Genbank).

    \n

    Public Domain Standard Notice

    \n

    This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC \u00a7 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.

    \n

    License Standard Notice

    \n

    The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.

    \n

    This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.

    \n

    This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.

    \n

    You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html

    \n

    The source code forked from other open source projects will inherit its license.

    \n

    Privacy Standard Notice\n

    \n

    This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC\u2019s privacy policy, please visit http://www.cdc.gov/other/privacy.html.

    \n

    Contributing Standard Notice\n

    \n

    Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.

    \n

    All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.

    \n

    Records Management Standard Notice\n

    \n

    This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.

    \n

    Additional Standard Notices\n

    \n

    Please refer to CDC\u2019s Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.

    \n\"\"\"\n ),\n]\n", "type": "text"}, {"name": "my_first_submission.py", "content": "from shiny import App, render, ui\n\ntest_data = [\n ui.h4(\"Generate test data for usage with SeqSender\"),\n ui.p(\"Test data for each database can be generated for multiple available organisms. \",\n \"To generate test data, use the \", ui.code(ui.strong(\"test_data\")), \" command. \"\n ),\n ui.p(\"Based on the selected \", ui.code(ui.strong(\"databases\")), \" and \", ui.code(ui.strong(\"organism\")),\n \", the applicable config file, raw reads, assembled fasta, and metadata will be generated at the specified \", ui.code(ui.strong(\"submission_dir\")), \". \",\n\n ),\n]\n\nseqsender_requirements = [\n ui.h4(\"Config File\"),\n ui.p(\"SeqSender uses a config file to simplify, keep consistent, and automate the submission file creation/upload. \",\n \"Fields required in your config file can change based on your database and organism selection. \",\n \"Use the tab: \", ui.strong(\"Submission Wizard\"), \" to generate a config file based on your database selection. \",\n ),\n ui.h4(\"Metadata Specific Fields\"),\n ui.p(\"SeqSender has specific required fields depending on which database you submit to that must be present in your metadata. \",\n \"All fields below are required unless specified otherwise and will be used repeatedly for when submitting to multiple databases. \"\n ),\n ui.tags.ul(\n ui.tags.li(ui.strong(\"sequence_name\")),\n ui.tags.ul(\n ui.p(\"Required for when submitting to \", ui.strong(\"GenBank\"), \". \",\n \"This field should contain the sequence header name of the fasta file you are using with SeqSender. \",\n ),\n ui.p(\"SeqSender will use this to join your metadata with your fasta file. \",\n \"This is to create the corresponding fasta file's for submission to GenBank with their updated submission name based on the name used for \", ui.code(ui.strong(\"gb-sample_name\")), \". \",\n ),\n ),\n ui.tags.li(ui.strong(\"organism\")),\n ui.tags.ul(\n ui.p(\"This should be the full name of the organism for the sample. \",\n \"Be sure that you have correctly spelled the full name of your organism to prevent submission issues. \",\n ),\n ),\n ui.tags.li(ui.strong(\"authors\")),\n ui.tags.ul(\n ui.p(\"This should be a one line, list of names associated to the sample you are submitting.\",\n \"The names should be structured in the format of \", ui.code(ui.strong(\" \")), \" with each name separated by a semi-colon. Middle names can be excluded. \",\n \"Your list of names should look something like this: \",\n ),\n ui.code(ui.strong(\"John Doe; Jane Doe; John Quincy Adams; Franklin Delano Roosevelt\")),\n ui.p(ui.strong(\"Note: \"), \"SeqSender uses a natural language processing library to sort names into first, middle, and last. \",\n \"While SeqSender does handle international and hyphenated names fairly well, it can still have issues correctly identifying every name's structure. \",\n \"If you find this is an issue for your name, try either removing/initializing your middle name or by removing the hypen from your name if present. \",\n ),\n ),\n ui.tags.li(ui.strong(\"collection_date\")),\n ui.tags.ul(\n ui.p(\"This should be an ISO-8601 formatted collection date for your sample. \",\n \"The format's accepted are: \", ui.code(ui.strong(\"YYYY-MM-DD\")), \", \", ui.code(ui.strong(\"YYYY-MM\")), \", or \", ui.code(ui.strong(\"YYYY\")), \". \",\n \"Time should not be included as it could create issues during submission. \"\n ),\n ),\n ui.tags.li(ui.strong(\"bioproject\")),\n ui.tags.ul(\n ui.p(\"This field is required when submitting to SRA or BioSample but is recommended to be used for all NCBI database submissions. \"\n \"Visit the \", ui.a(ui.strong(\"BioProject Web Portal\"), href=\"https://submit.ncbi.nlm.nih.gov/subs/bioproject/\"), \" to create a BioProject for your samples. \",\n ),\n ui.p(\"To add your BioProject to your metadata, all you need is the accession ID \", ui.code(ui.strong(\"(PRJNAxxxxxx, i.e. PRJNA123456)\")), \" created once you complete the BioProject.\"),\n ),\n ),\n]\n\nsra_database_submission = [\n ui.h4(\"Raw Reads Locations\"),\n ui.p(\"The raw reads for your samples can be stored in a variety of different locations and still be used in submission with SeqSender. \",\n \"Raw reads can either be stored locally or in the cloud when uploading to SRA, as well as, multiple files can be associated to one sample. \",\n \"The metadata column \", ui.code(ui.strong(\"sra-file_#\")), \", can be repeated where # is the numeric value of that file. \",\n \"(i.e. If you were uploading two files, you would have the first file path in \", ui.code(\"sra-file_1\"), \" and the second file path in \", ui.code(\"sra-file_2\"), \".)\"\n ),\n ui.p(\"If your raw reads are stored in the cloud you will want to include the full URL path to the file for the metadata column. \",\n \"To signify to SeqSender that this is a cloud URL, in the metadata column \", ui.code(ui.strong(\"sra-file_location\")), \", the keyword \", ui.code(ui.strong(\"cloud\")), \" should be included. \",\n ),\n ui.p(\"If your raw reads are locally stored locally they can be located in two locations to be accessed by SeqSender. \",\n \"If just the file name is included in your metadata column, then your raw reads should be stored in a folder named \", ui.code(ui.strong(\"raw_reads\")), \" at the location of your \", ui.code(ui.strong(\"--submission_dir\")), \" when using SeqSender. \",\n \"Otherwise, the full file path can be included in your submission. (\", ui.strong(\"Note: \"), \"Be sure if using docker/singularity that SeqSender has access to the location of your raw reads to prevent submission errors. \",\n \"For local files, the metadata column \", ui.code(ui.strong(\"sra-file_location\")), \" should use the keyword \", ui.code(ui.strong(\"local\")), \" to signify that the file is stored locally. \",\n ),\n ui.h4(\"Raw Reads Processing Error\"),\n ui.p(\"If your raw reads fail to process on SRA and it could be because they are incorrectly formatted for SRA. \",\n \"If the SRA team notifies you of this and recommends adding a \", ui.strong(\"sra loader\"), \" to correct the problem, that can be easily added to SeqSender. \",\n \"Using the metadata column\", ui.code(ui.strong(\"sra-loader\")), \" add the name of the specified loader by the SRA team to correct this issue. \",\n ),\n ui.h4(\"Metadata Fields\"),\n ui.p(\"For all required fields for SeqSender to submit data to SRA, refer to the tab: \", ui.strong(\"Submission Wizard\"), \". \",\n \"For all other optional fields, refer to NCBI's \", ui.a(ui.strong(\"SRA portal\"), href=\"https://www.ncbi.nlm.nih.gov/sra/docs/submitportal/\"), \", any metadata field can be easily added by using the specified column name with the prefix \", ui.code(\"sra-\"), \". \",\n ),\n]\n\nbiosample_database_submission = [\n ui.h4(\"Metadata Fields\"),\n ui.p(\"Required metadata columns change based on the specified \", ui.a(ui.strong(\"BioSample Package\"), href=\"\"), \" used in your submission. \",\n \"Refer to the tab: \", ui.strong(\"Submission Wizard\"), \" to get all the required metadata columns for your chosen package. \",\n \"If you want to add a supported column that is not present in the submission wizard, you can easily add it to your metadata using the specified column name with the prefix \", ui.code(\"bs-\"), \". \",\n ),\n]\n\nfirst_submission_body = [\n ui.h2(\"My First Submission\"),\n ui.hr(),\n ui.navset_pill_list(\n ui.nav_panel(\"Generate Test Data\", test_data),\n ui.nav_panel(\"SeqSender Requirements\", seqsender_requirements),\n ui.nav_menu(\"Database Specific Requirements\",\n ui.nav_panel(\"SRA\", sra_database_submission),\n ui.nav_panel(\"BioSample\", biosample_database_submission),\n ),\n id=\"tab\",\n ),\n]\n", "type": "text"}, {"name": "prerequisites.py", "content": "from shiny import App, render, ui\n\nncbi_prereq = [\n ui.h4(\"NCBI Submissions:\"),\n ui.p(\"SeqSender utilizes a UI-Less Data Submission Protocol to bulk upload submission files to NCBI databases. SeqSender also uses \", ui.a(ui.strong(\"table2asn\"), href=\"https://www.ncbi.nlm.nih.gov/genbank/table2asn/\"), \", to upload GenBank submissions for organisms other than Influenza and COVID-19, by emailing it to NCBI via a Simple Mail Transfer Protocol (SMTP). \",\n \"To begin submitting to NCBI with SeqSender, you must: \",\n ),\n ui.tags.ul(\n ui.tags.li(\"Have a \", ui.a(ui.strong(\"NCBI account\"), href=\"https://account.ncbi.nlm.nih.gov/\"), \". Sign up or login in to continue. \"),\n ui.p(\"To generate the files for submitting data to NCBI via their \", ui.a(ui.strong(\"submission portal\"), href = \"https://submit.ncbi.nlm.nih.gov/\"), \" or if you're only submitting data via table2asn, no extra steps must be taken. Use the tab: \", ui.strong(\"Submission Wizard\"), \" to get the required metadata columns for the database you're uploading to. \",\n \"If you're wanting SeqSender to handle uploading your samples for you, then follow the next steps: \",\n ),\n ui.tags.li(\"Contact NCBI at: \", ui.code(ui.strong(\"gb-admin@ncbi.nlm.nih.gov\")), \" to create your institution/group/lab's UI-less submission account. This will create an account for your institution/group/lab's and allow you to specify NCBI users of your institution/group/lab's access to the uploads via NCBI's \", ui.a(ui.strong(\"web portal\"), href=\"https://submit.ncbi.nlm.nih.gov/subs/\"), \". Make sure to answer the following questions below when contacting NCBI: \"),\n ui.tags.ul(\n ui.tags.li(ui.strong(\"MyNCBI account email of the primary submitter\")),\n ui.tags.li(ui.strong(\"center/account abbreviation\")),\n ui.tags.li(ui.strong(\"full center/account name\")),\n ui.tags.li(ui.strong(\"names and email addresses of all additional users\")),\n ui.tags.li(ui.strong(\"postal address of institute (including postal code and country)\")),\n ),\n ui.tags.li(\"Once created, the UI-less submission account credentials and spuid_namespace can be added to your config file to begin submitting your samples to NCBI. Be sure to use the SeqSender submission flag \", ui.code(ui.strong(\"--test\")), \" to perform an initial test submission to NCBI, to ensure everything is setup correctly. \"),\n )\n]\nprerequisites_body = [\n ui.h2(\"Prerequisites\"),\n ui.navset_tab(\n ui.nav_panel(\"NCBI\", ncbi_prereq),\n id=\"prerequisites_tab\",\n ),\n]\n", "type": "text"}, {"name": "seqsender.css", "content": ".custom_sidebar, .accordion-title, h1, h2, h3, h4, h5, h6 {\n font-weight: 600;\n background-image: radial-gradient(circle, #023382, #0359e2);\n color: transparent;\n background-clip: text;\n -webkit-background-clip: text;\n}\nhr {\n border: 2px solid black;\n}\n.custom_header {\n border-bottom: 2px solid DimGray;\n padding-bottom: 2px;\n}\n.custom_sidebar {\n text-decoration: none;\n font-size: large;\n padding: 5px;\n}\n.terminal_css {}\n", "type": "text"}, {"name": "seqsender_config.yaml", "content": "Submission:\n NCBI:\n Password: mypassword\n Username: myusername\n", "type": "text"}, {"name": "setup.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\nimport shiny_tools\n####################### SETUP PAGE ###############################\nyaml_css = \"background-color: #F0F0F0;white-space: nowrap; font-size: 20px ;margin-top:-15px;font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;-webkit-user-select: none; -ms-user-select: none; user-select: none;\"\n\ndef config_indent(tabs, string, custom_style = \"display:inline-block;\"):\n return div(ui.HTML((\" | \" * tabs) + string), style=custom_style)\n\ndef config_text_input(id, placeholder, help_msg, custom_style = \"display:inline-block;height:5px;\"):\n return div(ui.tooltip(ui.input_text(id, label=None, placeholder=placeholder), help_msg, id=(id + \"_tooltip\")), style=custom_style)\n\nsetup_body = [\n ui.h2(\"Setup\"),\n ui.layout_columns(\n ui.card(\n ui.card_header(\n ui.h4(\"Select Database:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(\n id = \"db_select_tooltip\",\n description = \"Select all databases you plan to submit your data to. The databases you plan to submit to will change the requirements for the config and metadata file.\",\n position=\"right\",\n ),\n ),\n ui.input_checkbox(\"BioSample_checkbox\", \"BioSample\", width=None),\n ui.tooltip(ui.input_checkbox(\"SRA_checkbox\", \"SRA\", width=None),\n \"When submitting to SRA, a BioSample submission is also required.\",\n style=\"display:inline-block;float:right;\"),\n ui.input_checkbox(\"GenBank_checkbox\", \"GenBank\", width=None),\n ),\n ui.card(\n ui.card_header(\n ui.h3(\"Database Options:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(id = \"db_option_tooltip\",\n description = \"Select database dependent options. This changes metadata requirements based on database submission criteria.\",\n position = \"right\",\n ),\n ),\n # If BioSample checkbox checked then load BioSample Package Options\n ui.panel_conditional(\n \"input.BioSample_checkbox\",\n ui.input_select(\n \"BioSample_packages\",\n label=\"Select BioSample Package:\",\n choices={\"STANDARD\": {\"SARS-CoV-2.cl.1.0\":\"SARS-CoV-2.cl.1.0\",\"SARS-CoV-2.wwsurv.1.0\":\"SARS-CoV-2.wwsurv.1.0\",\"Virus.1.0\":\"Virus.1.0\",\"Beta-lactamase.1.0\":\"Beta-lactamase.1.0\",\"Human.1.0\":\"Human.1.0\",\"Invertebrate.1.0\":\"Invertebrate.1.0\",\"Metagenome.environmental.1.0\":\"Metagenome.environmental.1.0\",\"Microbe.1.0\":\"Microbe.1.0\",\"Model.organism.animal.1.0\":\"Model.organism.animal.1.0\",\"OneHealthEnteric.1.0\":\"OneHealthEnteric.1.0\",\"Plant.1.0\":\"Plant.1.0\"},\n \"PATHOGEN\": {\"Pathogen.cl.1.0\":\"Pathogen.cl.1.0\",\"Pathogen.env.1.0\":\"Pathogen.env.1.0\"},\n \"MIGS.ba\": {\"MIGS.ba.6.0\":\"MIGS.ba.6.0\",\"MIGS.ba.agriculture.6.0\":\"MIGS.ba.agriculture.6.0\",\"MIGS.ba.air.6.0\":\"MIGS.ba.air.6.0\",\"MIGS.ba.built.6.0\":\"MIGS.ba.built.6.0\",\"MIGS.ba.food-animal.6.0\":\"MIGS.ba.food-animal.6.0\",\"MIGS.ba.food-farm.env.6.0\":\"MIGS.ba.food-farm.env.6.0\",\"MIGS.ba.food-human.foods.6.0\":\"MIGS.ba.food-human.foods.6.0\",\"MIGS.ba.food-prod.facility.6.0\":\"MIGS.ba.food-prod.facility.6.0\",\"MIGS.ba.host-associated.6.0\":\"MIGS.ba.host-associated.6.0\",\"MIGS.ba.human-associated.6.0\":\"MIGS.ba.human-associated.6.0\",\"MIGS.ba.human-gut.6.0\":\"MIGS.ba.human-gut.6.0\",\"MIGS.ba.human-oral.6.0\":\"MIGS.ba.human-oral.6.0\",\"MIGS.ba.human-skin.6.0\":\"MIGS.ba.human-skin.6.0\",\"MIGS.ba.human-vaginal.6.0\":\"MIGS.ba.human-vaginal.6.0\",\"MIGS.ba.hydrocarbon-cores.6.0\":\"MIGS.ba.hydrocarbon-cores.6.0\",\"MIGS.ba.hydrocarbon-fluids.swabs.6.0\":\"MIGS.ba.hydrocarbon-fluids.swabs.6.0\",\"MIGS.ba.microbial.6.0\":\"MIGS.ba.microbial.6.0\",\"MIGS.ba.miscellaneous.6.0\":\"MIGS.ba.miscellaneous.6.0\",\"MIGS.ba.plant-associated.6.0\":\"MIGS.ba.plant-associated.6.0\",\"MIGS.ba.sediment.6.0\":\"MIGS.ba.sediment.6.0\",\"MIGS.ba.soil.6.0\":\"MIGS.ba.soil.6.0\",\"MIGS.ba.symbiont-associated.6.0\":\"MIGS.ba.symbiont-associated.6.0\",\"MIGS.ba.wastewater.6.0\":\"MIGS.ba.wastewater.6.0\",\"MIGS.ba.water.6.0\":\"MIGS.ba.water.6.0\"},\n \"MIGS.eu\": {\"MIGS.eu.6.0\":\"MIGS.eu.6.0\",\"MIGS.eu.agriculture.6.0\":\"MIGS.eu.agriculture.6.0\",\"MIGS.eu.air.6.0\":\"MIGS.eu.air.6.0\",\"MIGS.eu.built.6.0\":\"MIGS.eu.built.6.0\",\"MIGS.eu.food-animal.6.0\":\"MIGS.eu.food-animal.6.0\",\"MIGS.eu.food-farm.env.6.0\":\"MIGS.eu.food-farm.env.6.0\",\"MIGS.eu.food-human.foods.6.0\":\"MIGS.eu.food-human.foods.6.0\",\"MIGS.eu.food-prod.facility.6.0\":\"MIGS.eu.food-prod.facility.6.0\",\"MIGS.eu.host-associated.6.0\":\"MIGS.eu.host-associated.6.0\",\"MIGS.eu.human-associated.6.0\":\"MIGS.eu.human-associated.6.0\",\"MIGS.eu.human-gut.6.0\":\"MIGS.eu.human-gut.6.0\",\"MIGS.eu.human-oral.6.0\":\"MIGS.eu.human-oral.6.0\",\"MIGS.eu.human-skin.6.0\":\"MIGS.eu.human-skin.6.0\",\"MIGS.eu.human-vaginal.6.0\":\"MIGS.eu.human-vaginal.6.0\",\"MIGS.eu.hydrocarbon-cores.6.0\":\"MIGS.eu.hydrocarbon-cores.6.0\",\"MIGS.eu.hydrocarbon-fluids.swabs.6.0\":\"MIGS.eu.hydrocarbon-fluids.swabs.6.0\",\"MIGS.eu.microbial.6.0\":\"MIGS.eu.microbial.6.0\",\"MIGS.eu.miscellaneous.6.0\":\"MIGS.eu.miscellaneous.6.0\",\"MIGS.eu.plant-associated.6.0\":\"MIGS.eu.plant-associated.6.0\",\"MIGS.eu.sediment.6.0\":\"MIGS.eu.sediment.6.0\",\"MIGS.eu.soil.6.0\":\"MIGS.eu.soil.6.0\",\"MIGS.eu.symbiont-associated.6.0\":\"MIGS.eu.symbiont-associated.6.0\",\"MIGS.eu.wastewater.6.0\":\"MIGS.eu.wastewater.6.0\",\"MIGS.eu.water.6.0\":\"MIGS.eu.water.6.0\"},\n \"MIGS.vi\": {\"MIGS.vi.6.0\":\"MIGS.vi.6.0\",\"MIGS.vi.agriculture.6.0\":\"MIGS.vi.agriculture.6.0\",\"MIGS.vi.air.6.0\":\"MIGS.vi.air.6.0\",\"MIGS.vi.built.6.0\":\"MIGS.vi.built.6.0\",\"MIGS.vi.food-animal.6.0\":\"MIGS.vi.food-animal.6.0\",\"MIGS.vi.food-farm.env.6.0\":\"MIGS.vi.food-farm.env.6.0\",\"MIGS.vi.food-human.foods.6.0\":\"MIGS.vi.food-human.foods.6.0\",\"MIGS.vi.food-prod.facility.6.0\":\"MIGS.vi.food-prod.facility.6.0\",\"MIGS.vi.host-associated.6.0\":\"MIGS.vi.host-associated.6.0\",\"MIGS.vi.human-associated.6.0\":\"MIGS.vi.human-associated.6.0\",\"MIGS.vi.human-gut.6.0\":\"MIGS.vi.human-gut.6.0\",\"MIGS.vi.human-oral.6.0\":\"MIGS.vi.human-oral.6.0\",\"MIGS.vi.human-skin.6.0\":\"MIGS.vi.human-skin.6.0\",\"MIGS.vi.human-vaginal.6.0\":\"MIGS.vi.human-vaginal.6.0\",\"MIGS.vi.hydrocarbon-cores.6.0\":\"MIGS.vi.hydrocarbon-cores.6.0\",\"MIGS.vi.hydrocarbon-fluids.swabs.6.0\":\"MIGS.vi.hydrocarbon-fluids.swabs.6.0\",\"MIGS.vi.microbial.6.0\":\"MIGS.vi.microbial.6.0\",\"MIGS.vi.miscellaneous.6.0\":\"MIGS.vi.miscellaneous.6.0\",\"MIGS.vi.plant-associated.6.0\":\"MIGS.vi.plant-associated.6.0\",\"MIGS.vi.sediment.6.0\":\"MIGS.vi.sediment.6.0\",\"MIGS.vi.soil.6.0\":\"MIGS.vi.soil.6.0\",\"MIGS.vi.symbiont-associated.6.0\":\"MIGS.vi.symbiont-associated.6.0\",\"MIGS.vi.wastewater.6.0\":\"MIGS.vi.wastewater.6.0\",\"MIGS.vi.water.6.0\":\"MIGS.vi.water.6.0\"},\n \"MIMAG\": {\"MIMAG.6.0\":\"MIMAG.6.0\",\"MIMAG.agriculture.6.0\":\"MIMAG.agriculture.6.0\",\"MIMAG.air.6.0\":\"MIMAG.air.6.0\",\"MIMAG.built.6.0\":\"MIMAG.built.6.0\",\"MIMAG.food-animal.6.0\":\"MIMAG.food-animal.6.0\",\"MIMAG.food-farm.env.6.0\":\"MIMAG.food-farm.env.6.0\",\"MIMAG.food-human.foods.6.0\":\"MIMAG.food-human.foods.6.0\",\"MIMAG.food-prod.facility.6.0\":\"MIMAG.food-prod.facility.6.0\",\"MIMAG.host-associated.6.0\":\"MIMAG.host-associated.6.0\",\"MIMAG.human-associated.6.0\":\"MIMAG.human-associated.6.0\",\"MIMAG.human-gut.6.0\":\"MIMAG.human-gut.6.0\",\"MIMAG.human-oral.6.0\":\"MIMAG.human-oral.6.0\",\"MIMAG.human-skin.6.0\":\"MIMAG.human-skin.6.0\",\"MIMAG.human-vaginal.6.0\":\"MIMAG.human-vaginal.6.0\",\"MIMAG.hydrocarbon-cores.6.0\":\"MIMAG.hydrocarbon-cores.6.0\",\"MIMAG.hydrocarbon-fluids.swabs.6.0\":\"MIMAG.hydrocarbon-fluids.swabs.6.0\",\"MIMAG.microbial.6.0\":\"MIMAG.microbial.6.0\",\"MIMAG.miscellaneous.6.0\":\"MIMAG.miscellaneous.6.0\",\"MIMAG.plant-associated.6.0\":\"MIMAG.plant-associated.6.0\",\"MIMAG.sediment.6.0\":\"MIMAG.sediment.6.0\",\"MIMAG.soil.6.0\":\"MIMAG.soil.6.0\",\"MIMAG.symbiont-associated.6.0\":\"MIMAG.symbiont-associated.6.0\",\"MIMAG.wastewater.6.0\":\"MIMAG.wastewater.6.0\",\"MIMAG.water.6.0\":\"MIMAG.water.6.0\"},\n \"MIMARKS.specimen\": {\"MIMARKS.specimen.6.0\":\"MIMARKS.specimen.6.0\",\"MIMARKS.specimen.agriculture.6.0\":\"MIMARKS.specimen.agriculture.6.0\",\"MIMARKS.specimen.air.6.0\":\"MIMARKS.specimen.air.6.0\",\"MIMARKS.specimen.built.6.0\":\"MIMARKS.specimen.built.6.0\",\"MIMARKS.specimen.food-animal.6.0\":\"MIMARKS.specimen.food-animal.6.0\",\"MIMARKS.specimen.food-farm.env.6.0\":\"MIMARKS.specimen.food-farm.env.6.0\",\"MIMARKS.specimen.food-human.foods.6.0\":\"MIMARKS.specimen.food-human.foods.6.0\",\"MIMARKS.specimen.food-prod.facility.6.0\":\"MIMARKS.specimen.food-prod.facility.6.0\",\"MIMARKS.specimen.host-associated.6.0\":\"MIMARKS.specimen.host-associated.6.0\",\"MIMARKS.specimen.human-associated.6.0\":\"MIMARKS.specimen.human-associated.6.0\",\"MIMARKS.specimen.human-gut.6.0\":\"MIMARKS.specimen.human-gut.6.0\",\"MIMARKS.specimen.human-oral.6.0\":\"MIMARKS.specimen.human-oral.6.0\",\"MIMARKS.specimen.human-skin.6.0\":\"MIMARKS.specimen.human-skin.6.0\",\"MIMARKS.specimen.human-vaginal.6.0\":\"MIMARKS.specimen.human-vaginal.6.0\",\"MIMARKS.specimen.hydrocarbon-cores.6.0\":\"MIMARKS.specimen.hydrocarbon-cores.6.0\",\"MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0\":\"MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0\",\"MIMARKS.specimen.microbial.6.0\":\"MIMARKS.specimen.microbial.6.0\",\"MIMARKS.specimen.miscellaneous.6.0\":\"MIMARKS.specimen.miscellaneous.6.0\",\"MIMARKS.specimen.plant-associated.6.0\":\"MIMARKS.specimen.plant-associated.6.0\",\"MIMARKS.specimen.sediment.6.0\":\"MIMARKS.specimen.sediment.6.0\",\"MIMARKS.specimen.soil.6.0\":\"MIMARKS.specimen.soil.6.0\",\"MIMARKS.specimen.symbiont-associated.6.0\":\"MIMARKS.specimen.symbiont-associated.6.0\",\"MIMARKS.specimen.wastewater.6.0\":\"MIMARKS.specimen.wastewater.6.0\",\"MIMARKS.specimen.water.6.0\":\"MIMARKS.specimen.water.6.0\"},\n \"MIMARKS.survey\": {\"MIMARKS.survey.agriculture.6.0\":\"MIMARKS.survey.agriculture.6.0\",\"MIMARKS.survey.air.6.0\":\"MIMARKS.survey.air.6.0\",\"MIMARKS.survey.built.6.0\":\"MIMARKS.survey.built.6.0\",\"MIMARKS.survey.food-animal.6.0\":\"MIMARKS.survey.food-animal.6.0\",\"MIMARKS.survey.food-farm.env.6.0\":\"MIMARKS.survey.food-farm.env.6.0\",\"MIMARKS.survey.food-human.foods.6.0\":\"MIMARKS.survey.food-human.foods.6.0\",\"MIMARKS.survey.food-prod.facility.6.0\":\"MIMARKS.survey.food-prod.facility.6.0\",\"MIMARKS.survey.host-associated.6.0\":\"MIMARKS.survey.host-associated.6.0\",\"MIMARKS.survey.human-associated.6.0\":\"MIMARKS.survey.human-associated.6.0\",\"MIMARKS.survey.human-gut.6.0\":\"MIMARKS.survey.human-gut.6.0\",\"MIMARKS.survey.human-oral.6.0\":\"MIMARKS.survey.human-oral.6.0\",\"MIMARKS.survey.human-skin.6.0\":\"MIMARKS.survey.human-skin.6.0\",\"MIMARKS.survey.human-vaginal.6.0\":\"MIMARKS.survey.human-vaginal.6.0\",\"MIMARKS.survey.hydrocarbon-cores.6.0\":\"MIMARKS.survey.hydrocarbon-cores.6.0\",\"MIMARKS.survey.hydrocarbon-fluids.swabs.6.0\":\"MIMARKS.survey.hydrocarbon-fluids.swabs.6.0\",\"MIMARKS.survey.microbial.6.0\":\"MIMARKS.survey.microbial.6.0\",\"MIMARKS.survey.miscellaneous.6.0\":\"MIMARKS.survey.miscellaneous.6.0\",\"MIMARKS.survey.plant-associated.6.0\":\"MIMARKS.survey.plant-associated.6.0\",\"MIMARKS.survey.sediment.6.0\":\"MIMARKS.survey.sediment.6.0\",\"MIMARKS.survey.soil.6.0\":\"MIMARKS.survey.soil.6.0\",\"MIMARKS.survey.symbiont-associated.6.0\":\"MIMARKS.survey.symbiont-associated.6.0\",\"MIMARKS.survey.wastewater.6.0\":\"MIMARKS.survey.wastewater.6.0\",\"MIMARKS.survey.water.6.0\":\"MIMARKS.survey.water.6.0\"},\n \"MIMS.me\": {\"MIMS.me.agriculture.6.0\":\"MIMS.me.agriculture.6.0\",\"MIMS.me.air.6.0\":\"MIMS.me.air.6.0\",\"MIMS.me.built.6.0\":\"MIMS.me.built.6.0\",\"MIMS.me.food-animal.6.0\":\"MIMS.me.food-animal.6.0\",\"MIMS.me.food-farm.env.6.0\":\"MIMS.me.food-farm.env.6.0\",\"MIMS.me.food-human.foods.6.0\":\"MIMS.me.food-human.foods.6.0\",\"MIMS.me.food-prod.facility.6.0\":\"MIMS.me.food-prod.facility.6.0\",\"MIMS.me.host-associated.6.0\":\"MIMS.me.host-associated.6.0\",\"MIMS.me.human-associated.6.0\":\"MIMS.me.human-associated.6.0\",\"MIMS.me.human-gut.6.0\":\"MIMS.me.human-gut.6.0\",\"MIMS.me.human-oral.6.0\":\"MIMS.me.human-oral.6.0\",\"MIMS.me.human-skin.6.0\":\"MIMS.me.human-skin.6.0\",\"MIMS.me.human-vaginal.6.0\":\"MIMS.me.human-vaginal.6.0\",\"MIMS.me.hydrocarbon-cores.6.0\":\"MIMS.me.hydrocarbon-cores.6.0\",\"MIMS.me.hydrocarbon-fluids.swabs.6.0\":\"MIMS.me.hydrocarbon-fluids.swabs.6.0\",\"MIMS.me.microbial.6.0\":\"MIMS.me.microbial.6.0\",\"MIMS.me.miscellaneous.6.0\":\"MIMS.me.miscellaneous.6.0\",\"MIMS.me.plant-associated.6.0\":\"MIMS.me.plant-associated.6.0\",\"MIMS.me.sediment.6.0\":\"MIMS.me.sediment.6.0\",\"MIMS.me.soil.6.0\":\"MIMS.me.soil.6.0\",\"MIMS.me.symbiont-associated.6.0\":\"MIMS.me.symbiont-associated.6.0\",\"MIMS.me.wastewater.6.0\":\"MIMS.me.wastewater.6.0\",\"MIMS.me.water.6.0\":\"MIMS.me.water.6.0\"},\n \"MISAG\": {\"MISAG.6.0\":\"MISAG.6.0\",\"MISAG.agriculture.6.0\":\"MISAG.agriculture.6.0\",\"MISAG.air.6.0\":\"MISAG.air.6.0\",\"MISAG.built.6.0\":\"MISAG.built.6.0\",\"MISAG.food-animal.6.0\":\"MISAG.food-animal.6.0\",\"MISAG.food-farm.env.6.0\":\"MISAG.food-farm.env.6.0\",\"MISAG.food-human.foods.6.0\":\"MISAG.food-human.foods.6.0\",\"MISAG.food-prod.facility.6.0\":\"MISAG.food-prod.facility.6.0\",\"MISAG.host-associated.6.0\":\"MISAG.host-associated.6.0\",\"MISAG.human-associated.6.0\":\"MISAG.human-associated.6.0\",\"MISAG.human-gut.6.0\":\"MISAG.human-gut.6.0\",\"MISAG.human-oral.6.0\":\"MISAG.human-oral.6.0\",\"MISAG.human-skin.6.0\":\"MISAG.human-skin.6.0\",\"MISAG.human-vaginal.6.0\":\"MISAG.human-vaginal.6.0\",\"MISAG.hydrocarbon-cores.6.0\":\"MISAG.hydrocarbon-cores.6.0\",\"MISAG.hydrocarbon-fluids.swabs.6.0\":\"MISAG.hydrocarbon-fluids.swabs.6.0\",\"MISAG.microbial.6.0\":\"MISAG.microbial.6.0\",\"MISAG.miscellaneous.6.0\":\"MISAG.miscellaneous.6.0\",\"MISAG.plant-associated.6.0\":\"MISAG.plant-associated.6.0\",\"MISAG.sediment.6.0\":\"MISAG.sediment.6.0\",\"MISAG.soil.6.0\":\"MISAG.soil.6.0\",\"MISAG.symbiont-associated.6.0\":\"MISAG.symbiont-associated.6.0\",\"MISAG.wastewater.6.0\":\"MISAG.wastewater.6.0\",\"MISAG.water.6.0\":\"MISAG.water.6.0\"},\n \"MIUVIG\": {\"MIUVIG.6.0\":\"MIUVIG.6.0\",\"MIUVIG.agriculture.6.0\":\"MIUVIG.agriculture.6.0\",\"MIUVIG.air.6.0\":\"MIUVIG.air.6.0\",\"MIUVIG.built.6.0\":\"MIUVIG.built.6.0\",\"MIUVIG.food-animal.6.0\":\"MIUVIG.food-animal.6.0\",\"MIUVIG.food-farm.env.6.0\":\"MIUVIG.food-farm.env.6.0\",\"MIUVIG.food-human.foods.6.0\":\"MIUVIG.food-human.foods.6.0\",\"MIUVIG.food-prod.facility.6.0\":\"MIUVIG.food-prod.facility.6.0\",\"MIUVIG.host-associated.6.0\":\"MIUVIG.host-associated.6.0\",\"MIUVIG.human-associated.6.0\":\"MIUVIG.human-associated.6.0\",\"MIUVIG.human-gut.6.0\":\"MIUVIG.human-gut.6.0\",\"MIUVIG.human-oral.6.0\":\"MIUVIG.human-oral.6.0\",\"MIUVIG.human-skin.6.0\":\"MIUVIG.human-skin.6.0\",\"MIUVIG.human-vaginal.6.0\":\"MIUVIG.human-vaginal.6.0\",\"MIUVIG.hydrocarbon-cores.6.0\":\"MIUVIG.hydrocarbon-cores.6.0\",\"MIUVIG.hydrocarbon-fluids.swabs.6.0\":\"MIUVIG.hydrocarbon-fluids.swabs.6.0\",\"MIUVIG.microbial.6.0\":\"MIUVIG.microbial.6.0\",\"MIUVIG.miscellaneous.6.0\":\"MIUVIG.miscellaneous.6.0\",\"MIUVIG.plant-associated.6.0\":\"MIUVIG.plant-associated.6.0\",\"MIUVIG.sediment.6.0\":\"MIUVIG.sediment.6.0\",\"MIUVIG.soil.6.0\":\"MIUVIG.soil.6.0\",\"MIUVIG.symbiont-associated.6.0\":\"MIUVIG.symbiont-associated.6.0\",\"MIUVIG.wastewater.6.0\":\"MIUVIG.wastewater.6.0\",\"MIUVIG.water.6.0\":\"MIUVIG.water.6.0\"}\n },\n selected=\"Pathogen.cl.1.0\",\n ),\n ),\n # If GenBank checkbox checked then load Genbank Schema Options\n ui.panel_conditional(\n \"input.GenBank_checkbox\",\n ui.input_select(\n \"GenBank_schemas\",\n label=\"Select SeqSender GenBank Schema:\",\n choices=[\"COV\", \"FLU\", \"OTHER\"],\n selected=\"OTHER\",\n ),\n ),\n ),\n ),\n # Based on choices display config and metadata template\n ui.panel_conditional(\n \"input.BioSample_checkbox || input.SRA_checkbox || input.GenBank_checkbox\",\n ui.card(\n ui.card_header(\n ui.h4(\"Create Config File:\", style=\"display:inline-block;\"),\n shiny_tools.create_help_tooltip(\n id = \"config_tooltip\",\n description = \"Based on previous selections, required fields for the config file can change. The config file is used to generate the necessary files for submission.\",\n position=\"right\",\n ),\n ),\n ui.card(\n ui.page_fluid(\n div(ui.HTML(\"Submission:\"), style=\"margin-top:-20px\"),\n ui.panel_conditional(\n \"input.BioSample_checkbox || input.SRA_checkbox || input.GenBank_checkbox\",\n config_indent(1, \"NCBI:\", custom_style = \"\"),\n # Username\n config_indent(2, \"Username:\"),\n config_text_input(\"ncbi_config_username\", placeholder = \"NCBI FTP Username\", help_msg = ui.p(\"Username for your NCBI FTP account.\", ui.strong(\"Not your NCBI account username.\"))),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Spuid Namespace\n config_indent(2, \"Spuid_Namespace:\"),\n config_text_input(\"ncbi_config_spuid_namespace\", placeholder = \"NCBI SPUID Namespace\", help_msg = ui.p(\"NCBI SPUID namespace. This should have been provided when you set up your submisison group for NCBI FTP submissions.\")),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # BioSample Package\n ui.panel_conditional(\n \"input.BioSample_checkbox\",\n config_indent(2, \"BioSample_Package:\"),\n div(\n ui.output_text(\"BioSample_Package_Name\",inline=True,),\n shiny_tools.create_help_tooltip(\"config_bs_package\", description = (\"This is predetermined based on database options selected.\"), position = \"none\"),\n style=\"display:inline-block;height:5px;\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n ),\n ui.panel_conditional(\n \"input.GenBank_checkbox\",\n # Automatically remove GenBank samples if failed to upload\n config_indent(2, \"GenBank_Auto_Remove_Failed_Samples:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_auto_remove_genbank\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_auto_remove\", description = (\"If you're submitting to GenBank via FTP, this will automatically remove sequences that fail to pass GenBank's validation and annotation, only if there are samples that did pass. A report file (\", ui.code(\"seq-edit-report.html\"), \") will also be generated explaining the reason why the samples were rejected.\"), position = \"none\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n ),\n # Publication title\n config_indent(2, \"Publication_Title:\"),\n config_text_input(\"ncbi_config_publication_title\", placeholder = \"Publication Title\", help_msg = ui.p(\"Publication title for your NCBI submissions. If your samples are part of a paper/article then that title should be used here, otherwise, use a descriptive title for the submissions you plan to make with this config file.\")),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Publication status\n config_indent(2, \"Publication_Status:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_publication_status\",\n label=None,\n choices=[\"Unpublished\", \"In-press\", \"Published\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_sub_status\", description = (\"If a paper is included with your submission then use \\\"In-press\\\" or \\\"Published\\\". If you haven't or aren't publishing a paper with your samples then use \\\"Unpublished\\\".\"), position = \"none\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Specified release date\n config_indent(2, \"Specified_Release_Date:\"),\n config_text_input(\"ncbi_config_release_date\", placeholder = \"Release Date\", help_msg = \"Release date for NCBI submissions. Allows you to specify when should NCBI make your submissions public, allowing you to submit your samples ahead of a planned release. If you want to release samples immediately leave blank or specify a date as \\\"YYYY-MM-DD\\\" to release at a specific date. This field also takes the option of a numeric value followed by one of the key words \\\"days\\\", \\\"weeks\\\", or \\\"months\\\", to have SeqSender create a specified release date based on when SeqSender is ran.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Link sample between NCBI databases\n config_indent(2, \"Link_Sample_Between_NCBI_Databases:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_link_samples\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_link_sample\", description = (\"If you're submitting your samples to multiple NCBI databases, do you want your sample's data linked between each database?\"), position = \"none\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Add NCBI accessions to FASTA def lines\n config_indent(2, \"Add_Definition_Line_Accessions:\"),\n div(ui.input_radio_buttons(\n \"ncbi_config_fasta_def_lines\",\n label=None,\n choices=[\"True\", \"False\"],\n inline=True,\n ),\n style=\"display:inline-block;height:5px;font-size:medium;\",\n ),\n shiny_tools.create_help_tooltip(\"ncbi_fasta_def_lines\", description = (\"Accessions from BioSample and SRA are added to the GenBank (\", ui.code(\"source.src\"), \") file during the submission process to link between databases. Enable this to additionally add them to the fasta definition lines for each sequence.\"), position = \"none\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Description category\n config_indent(2, \"Description:\", custom_style = \"\"),\n # Organization category\n config_indent(3, \"Organization\", custom_style = \"\"),\n # Organization role\n config_indent(4, \"Role:\"),\n config_text_input(\"ncbi_config_role\", placeholder=\"Organization Role\", help_msg = \"Provided by NCBI when setting up your FTP account.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Organization type\n config_indent(4, \"Type:\"),\n config_text_input(\"ncbi_config_type\", placeholder= \"Organization Type\", help_msg = \"Provided by NCBI when setting up your FTP account.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Organization name\n config_indent(4, \"Name:\"),\n config_text_input(\"ncbi_config_org_name\", placeholder = \"Organization Name\", help_msg = \"Submitting group's name.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # Address category\n config_indent(5, \"Address:\", custom_style = \"\"),\n # submitter affiliation\n config_indent(6, \"Affil:\"),\n config_text_input(\"ncbi_config_affil\", placeholder = \"Submitter Affiliation\", help_msg = \"Submitting organization's full name.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter division\n config_indent(6, \"Div:\"),\n config_text_input(\"ncbi_config_div\", placeholder = \"Submitter Division\", help_msg = \"Submitting department/laboratory name.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter street\n config_indent(6, \"Street:\"),\n config_text_input(\"ncbi_config_street\", placeholder = \"Submitting Organization Street Name\", help_msg = \"Street name.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter city\n config_indent(6, \"City:\"),\n config_text_input(\"ncbi_config_city\", placeholder = \"Submitting Organization City\", help_msg = \"City.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter state\n config_indent(6, \"Sub:\"),\n config_text_input(\"ncbi_config_state\", placeholder = \"Submitting Organization State/Providence\", help_msg = \"State/Providence.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter zipcode\n config_indent(6, \"Postal_Code:\"),\n config_text_input(\"ncbi_config_postal\", placeholder = \"Submitting Organization Postal Code\", help_msg = \"Postal code.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter country\n config_indent(6, \"Country:\"),\n config_text_input(\"ncbi_config_country\", placeholder = \"Submitting Organization Country\", help_msg = \"Country\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter contact email\n config_indent(6, \"Email:\"),\n config_text_input(\"ncbi_config_email\", placeholder = \"Submitting Organization Email\", help_msg = \"Email for someone to contact you at if they have questions about your samples.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter contact phone\n config_indent(6, \"Phone:\"),\n config_text_input(\"ncbi_config_phone\", placeholder = \"Submitting Organization Phone\", help_msg = \"Phone number for someone to contact you at if they have questions about your samples.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter point of contact\n config_indent(5, \"Submitter\", custom_style = \"\"),\n # submitter poc email\n config_indent(6, \"Email:\"),\n config_text_input(\"ncbi_sub_email_one\", \"Submitter Contact Email\", help_msg = \"Email for someone at NCBI to contact about issues during the submission process.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # submitter poc email\n config_indent(6, \"Alt_Email:\"),\n config_text_input(\"ncbi_sub_email_two\", \"Submitter Contact Email\", help_msg = \"Alternate email for someone at NCBI to contact about issues during the submission process.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n # poc name\n config_indent(6, \"Name:\", custom_style = \"\"),\n # poc name first\n config_indent(7, \"First:\"),\n config_text_input(\"ncbi_config_first_name\", placeholder = \"Submitter First Name\", help_msg = \"Who is making the submission: First Name.\"),\n div(ui.HTML(\"
    \"), style=\"margin-top:-25px;\"),\n config_indent(7, \"Last:\"),\n config_text_input(\"ncbi_config_last_name\", placeholder = \"Submitter Last Name\", help_msg = \"Who is making the submission: Last Name.\"),\n ),\n ),\n style=yaml_css,\n ),\n ui.download_button(\"download_config\", \"Download Config File\"),\n ),\n ui.card(\n ui.card_header(\n ui.h4(\"Metadata Template:\", style=\"display:inline-block;\"),\n ui.tooltip(\n ui.p(\"\u2753\"),\n \"Additional info\",\n id=\"metadata_tooltip\",\n style=\"display:inline-block;float:right;\",\n ),\n ),\n ui.HTML(\n \"

    Note: More columns may be available not displayed in this list. To add a column not here during submission, add it matching the style of the other columns related to the database: database_prefix-column_name.\"\n ),\n ui.output_table(\"load_database_metadata_dataframe\"),\n ui.HTML(\n \"\"\"\nMetadata Sections Legend:\n

    SeqSender: No prefix | BioSample: bs- | SRA: sra- | GenBank: gb-

    \n\"\"\"\n ),\n ui.download_button(\"download_metadata\", \"Download Metadata Template\"),\n ),\n ),\n]\n", "type": "text"}, {"name": "shiny_tools.py", "content": "from shiny import App, Inputs, Outputs, Session, render, req, ui, reactive\nfrom htmltools import TagList, div\n\n\nterminal_css = \"\"\n\ndef software_requirements(version):\n requirements = \"\"\"
    \n

    SOFTWARE REQUIREMENTS:

    \n
      \n
    • Linux (64-bit) or Mac OS X (64-bit)
    • \n
    • Git version 2.25.1 or later
    • \n
    • Standard utilities: curl, tar, unzip
    • \n\"\"\"\n if version == \"Local\":\n return ui.HTML(requirements + \"\"\"
    \"\"\")\n elif version == \"Docker\":\n return ui.HTML(\n requirements\n + \"\"\"\n
  • Docker version 20.10.14 or later
  • \n
  • [Optional] Docker Compose version 2.21 or later
  • \n\n\"\"\"\n )\n elif version == \"Singularity\":\n return ui.HTML(\n requirements\n + \"\"\"\n
  • Singularity version 3.8.7 or later
  • \n\n\"\"\"\n )\n else:\n return \"\"\n\ndef seqsender_help_output_msg(version):\n message = \"\"\"\nusage: seqsender.py [-h] {prep,submit,submission_status,load_credentials,test_data,update_biosample,test_network_connection,version} ...

    \n

    Automate the process of batch uploading consensus sequences and metadata to databases of your choices

    \n

    positional arguments:
    \n | {prep,submit,submission_status,load_credentials,test_data,update_biosample,test_network_connection,version}

    \n

    optional arguments:
    \n | -h, --help |  show this help message and exit

    \n\"\"\"\n if version == \"Local\":\n command = (\n \"\"\"

    (seqsender) [USER@server seqsender]$ python seqsender.py --help
    \"\"\"\n )\n elif version == \"Docker\":\n command = \"\"\"

    docker exec -it seqsender bash seqsender-kickoff --help
    \"\"\"\n elif version == \"Singularity\":\n command = \"\"\"

    singularity exec ~/singularity/seqsender.sif seqsender-kickoff --help
    \"\"\"\n else:\n command = \"\"\"

    \"\"\"\n return ui.card(ui.HTML(command + message), style=terminal_css)\n\n\ndatabases_parameter = [\n ui.strong(\"Databases\"),\n ui.tags.ul(\n ui.tags.li(\n ui.strong(\n ui.code(\"--biosample\"),\n \" | \",\n ui.code(\"-b\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: BioSample\"),\n \".\",\n inline=True,\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"--sra\"),\n \" | \",\n ui.code(\"-s\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: SRA\"),\n \".\",\n inline=True,\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"--genbank\"),\n \" | \",\n ui.code(\"-n\"),\n ),\n ui.tags.ul(\n \" Generate files required for submission to \",\n ui.strong(\"NCBI Database: GenBank\"),\n \".\",\n inline=True,\n ),\n ),\n ),\n]\n\norganisms_parameter = [\n ui.strong(\"Organism\"),\n ui.div(\n ui.strong(ui.code(\"--organism \"), \"{'FLU', 'COV', 'OTHER'}\"),\n inline=True,\n ),\n ui.p(\n \"Organism selection adjusts seqsender submission process for organism specific criteria.\"\n ),\n ui.tags.ul(\n ui.tags.li(\n ui.strong(\n ui.code(\"FLU\"),\n ),\n ui.tags.ul(\n \" For \",\n ui.strong(\"Influenza A virus\"),\n \", enables FTP GenBank submission.\",\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"COV\"),\n ),\n ui.tags.ul(\n \" For \",\n ui.strong(\"SARS-CoV-2\"),\n \", enables FTP GenBank submission.\",\n ),\n ),\n ui.tags.li(\n ui.strong(\n ui.code(\"OTHER\"),\n ),\n ui.tags.ul(\n \" For any organism that does not have special submission options.\"\n ),\n ),\n ),\n]\n\nsubmission_directory_parameter = ui.div(\n ui.strong(ui.code(\"--submission_dir\")),\n ui.tags.ul(\"Directory where all files required for submission are stored.\"),\n)\n\nsubmission_name_parameter = ui.div(\n ui.strong(ui.code(\"--submission_name\")),\n ui.tags.ul(\"Unique name to use for submission. Used as a unique identifier for submission to databases and to name the files created for submission.\"),\n)\n\nconfig_parameter = ui.div(\n ui.strong(ui.code(\"--config_file\")),\n ui.tags.ul(\"Full path to config file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\nencrypt_config_parameter = ui.div(\n ui.strong(ui.code(\"--config_file\")),\n ui.tags.ul(\"Config file to be used in the creation/submission of your samples. Input full file path.\"),\n)\n\ndecrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Key provided to access credentials stored in config file.\"),\n)\n\nencrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Encryption key to use when encrypting your credentials. Allows the user to reuse the encryption key for multiple config files for users where multiple config files are needed for different submission criteria.\"),\n)\n\nmulti_decrypt_key_parameter = ui.div(\n ui.strong(ui.code(\"--key\")),\n ui.tags.ul(\"Key provided to access credentials stored in config file. Multiple keys may be provided if multiple config files are being checked.\"),\n)\n\nmetadata_parameter = ui.div(\n ui.strong(ui.code(\"--metadata_file\")),\n ui.tags.ul(\"Full path to metadata file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\nfasta_parameter = ui.div(\n ui.strong(ui.code(\"--fasta_file\")),\n ui.tags.ul(\"Full path to fasta file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\ntable2asn_parameter = ui.div(\n ui.strong(ui.code(\"--table2asn\")),\n ui.tags.ul(\"Flag to enable a \\\"table2asn\\\" submission for GenBank. Automatically enabled for organisms other than \\\"FLU\\\" and \\\"COV\\\".\"),\n)\n\ngff_parameter = ui.div(\n ui.strong(ui.code(\"--gff_file\")),\n ui.tags.ul(\"Full path to gff file if not stored in \", ui.code(\"--submission_dir\"), \" location.\"),\n)\n\ntest_parameter = ui.div(\n ui.strong(ui.code(\"--test\")),\n ui.tags.ul(\"Flag to enable a \\\"test\\\" submission to each database selected.\"),\n)\n\nvalidation_parameter = ui.div(\n ui.strong(ui.code(\"--skip_validation\")),\n ui.tags.ul(\"Flag to skip pandera validation for \", ui.code(\"--metadata_file\"), \". Warning, skipping validation can cause unexpected errors when missing required data.\"),\n)\n\npublication_parameter = [\n ui.div(\n ui.strong(ui.code(\"--publication_title\")),\n ui.tags.ul(\"Publication Title associated with sample submission. For GenBank only, overwrites value given via config file.\"),\n ),\n ui.div(\n ui.strong(ui.code(\"--publication_status\"), \"{ 'Unpublished', 'In-press', 'Published' }\"),\n ui.tags.ul(\"Status of publication associated with sample submission. For GenBank only, overwrites value given via config file.\"),\n )\n]\n\n\ndef seqsender_submit_help_output_msg(version):\n message = \"\"\"\nusage: seqsender.py submit [-h] [--biosample] [--sra] [--genbank] --organism {FLU,COV,OTHER}\n--submission_name SUBMISSION_NAME --submission_dir SUBMISSION_DIR --config_file CONFIG_FILE --key KEY\n--metadata_file METADATA_FILE --fasta_file FASTA_FILE [--table2asn] [--gff_file GFF_FILE] [--test] [--skip_validation]\n[--publication_title PUBLICATION_TITLE] [--publication_status {Unpublished,In-press,Published}]

    \n

    Create submission files and then batch uploading them to databases of choices.

    \n

    optional arguments:
    \n -h, --help  |  |  |  \nshow this help message and exit
    \n --biosample, -b  |  | \nSubmit to BioSample database. (default: )
    \n --sra, -s  |  |  |  \nSubmit to SRA database. (default: )
    \n --genbank, -n  |  |  \nSubmit to Genbank database. (default: )
    \n --organism {FLU,COV,OTHER}
     |  |  |  | \nType of organism data (default: FLU)
    \n --submission_name SUBMISSION_NAME
     |  |  |  | \nName of the submission (default: None)
    \n --submission_dir SUBMISSION_DIR
     |  |  |  | \nDirectory to where all required files (such as metadata, fasta, etc.) are stored (default: None)
    \n --config_file CONFIG_FILE
     |  |  |  | \nConfig file stored in submission directory (default: None)
    \n --key KEY
     |  |  |  | \nKey provided to access credentials stored in config file (default: None)
    \n --metadata_file METADATA_FILE
     |  |  |  | \nMetadata file stored in submission directory (default: None)
    \n --fasta_file FASTA_FILE
     |  |  |  | \nFasta file stored in submission directory (default: None)
    \n --table2asn  |  |  \nWhether to prepare a Table2asn submission. (default: False)
    \n --gff_file GFF_FILE  \nAn annotation file to add to a Table2asn submission (default: None)
    \n --test  |  |  |  | \nWhether to perform a test submission. (default: False)
    \n\"\"\"\n if version == \"Local\":\n command = \"\"\"

    (seqsender) [USER@server seqsender]$ python seqsender.py submit --help
    \"\"\"\n elif version == \"Docker\":\n command = (\n \"\"\"

    docker exec -it seqsender bash seqsender-kickoff submit --help
    \"\"\"\n )\n elif version == \"Singularity\":\n command = \"\"\"

    singularity exec ~/singularity/seqsender.sif seqsender-kickoff submit --help
    \"\"\"\n else:\n command = \"\"\"\"\"\"\n return ui.card(ui.HTML(command + message), style=terminal_css)\n\n# Returns parameters in format for code example and descriptive list of parameter\ndef get_parameters(command, output):\n command_string = \"\"\n parameters = []\n # Databases parameter\n if command in [\"prep\", \"submit\", \"test_data\"]:\n command_string += \" [<databases>]\"\n parameters.append(databases_parameter)\n # Organisms parameter\n if command in [\"prep\", \"submit\", \"test_data\"]:\n command_string += \" [--organism <organism>]\"\n parameters.append(organisms_parameter)\n # Submission_dir parameter\n if command in [\"prep\", \"submit\", \"test_data\", \"submission_status\"]:\n command_string += \" [--submission_dir <directory_path>]\"\n parameters.append(submission_directory_parameter)\n # Add submission_name parameter\n if command in [\"prep\", \"submit\", \"submission_status\"]:\n command_string += \" [--submission_name <name>]\"\n parameters.append(submission_name_parameter)\n # Add config_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--config_file <config_file_path>]\"\n parameters.append(config_parameter)\n # Add decrypt_key parameter\n if command in [\"submit\"]:\n command_string += \" [--key <key>]\"\n parameters.append(decrypt_key_parameter)\n # Add multi_decrypt_key parameter\n if command in [\"submission_status\"]:\n command_string += \" [--key <key>]\"\n parameters.append(multi_decrypt_key_parameter)\n # Add encrypt_config parameter\n if command in [\"load_credentials\"]:\n command_string += \" [--config_file <config_file_path>]\"\n parameters.append(encrypt_config_parameter)\n # Add encrypt_key parameter\n if command in [\"load_credentials\"]:\n command_string += \" [--key <key>]\"\n parameters.append(encrypt_key_parameter)\n # Add metadata_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--metadata_file <metadata_file_path>]\"\n parameters.append(metadata_parameter)\n # Add fasta_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--fasta_file <fasta_file_path>]\"\n parameters.append(fasta_parameter)\n # Add table2asn parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--table2asn]\"\n parameters.append(table2asn_parameter)\n # Add gff_file parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--gff_file <gff_file_path>]\"\n parameters.append(gff_parameter)\n # Add test parameter\n if command in [\"submit\"]:\n command_string += \" [--test]\"\n parameters.append(test_parameter)\n # Add skip pandera validation parameter\n if command in [\"prep\", \"submit\"]:\n command_string += \" [--skip_validation]\"\n parameters.append(validation_parameter)\n if output == \"string\":\n return command_string\n elif output == \"description\":\n return parameters\n\ndef seqsender_example_command(platform, command, flags):\n # Platform specific layout\n message = \"

    \"\n    if platform == \"local\":\n        message += \"python seqsender.py \"\n    elif platform == \"docker\":\n        message += \"docker exec -it seqsender bash seqsender-kickoff \"\n    elif platform == \"singularity\":\n        message += \"singularity exec ~/singularity/seqsender.sif seqsender-kickoff \"\n    else:\n        message += \"\"\n    # Seqsender command\n    message += command\n    ### Add parameters\n    message += get_parameters(command, \"string\") + \"
    \"\n return ui.HTML(message)\n\ndef command_submenu_accordion(command):\n submenu = []\n open_tabs = []\n parameters = get_parameters(command, \"description\")\n if len(parameters) > 0:\n submenu.append(ui.accordion_panel(\"Parameters\", parameters))\n open_tabs.append(\"Parameters\")\n notes = [] # notes function\n if len(notes) > 0:\n submenu.append(ui.accordion_panel(\"Notes\", notes))\n open_tabs.append(\"Notes\")\n examples = [] # examples function\n if len(examples) > 0:\n submenu.append(ui.accordion_panel(\"Examples\", examples))\n if len(submenu) > 0:\n return ui.accordion(*submenu, open = open_tabs)\n else:\n return \"\"\n\ndef command_accordion_panel(command, description):\n return ui.accordion_panel(\n command.capitalize(),\n ui.p(\n \"The \",\n ui.code(command),\n description,\n ),\n seqsender_example_command(\"local\", command, \"\"),\n command_submenu_accordion(command),)\n\ndef file_output_column_info(column_name, description, controlled_fields):\n list_item = ui.tags.li(\n ui.strong(\n ui.code(column_name),\n ),\n ui.tags.ul(\n ui.p(description),\n file_output_controlled_field_info(controlled_fields),\n )\n )\n return list_item\n\ndef file_output_controlled_field_info(controlled_fields):\n keywords = []\n if controlled_fields:\n for key, description in controlled_fields:\n keywords.append(ui.tags.li(ui.p(ui.strong(key, \": \"), description), style=\"margin-top:10px;\"))\n return keywords\n\ndef create_help_tooltip(id, description, position):\n return ui.tooltip(ui.p(\"\u2753\"),description,id=id,style=\"display:inline-block;float:\" + position + \";\",)\n", "type": "text"}, {"name": "templates/config.biosample.Beta-lactamase.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-beta_lactamase_family,Required,Specify the beta-lactamase family for this gene.\nbs-carbapenemase,Required,\"Does the enzyme exhibit carbapenemase activity? If the enzyme does exhibit carbapenemase activity, the response should be \"\"yes\"\", otherwise \"\"no.\"\"\"\nbs-edta_inhibitor_tested,Required,\"Was carbapenemase activity tested in the presence of EDTA? If carbapenemase activity was tested in the presence of EDTA, the response should be \"\"yes\"\", otherwise \"\"no\u201d.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lab_host,Optional,\"Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Human.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-age,Required,\"age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-biomaterial_provider,Required,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sex,Required,physical sex of sampled organism\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_subtype,Optional,\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-dev_stage,Optional,Developmental stage at the time of sampling.\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-ethnicity,Optional,ethnicity of the subject\nbs-health_state,Optional,Health or disease status of sample at time of collection\nbs-karyotype,Optional,\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-population,Optional,\"for human: ; for plants: filial generation, number of progeny, genetic structure\"\nbs-race,Optional,\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Invertebrate.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-breed,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". breed name - chiefly used in domesticated animals or plants\"\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-age,Optional,\"age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-dev_stage,Optional,Developmental stage at the time of sampling.\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sex,Optional,physical sex of sampled organism\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.ba.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,Required,microbial or eukaryotic strain name\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-num_replicons,Required,Number of replicons in nuclear genome\nbs-ref_biomaterial,Required,Primary publication or genome report\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.eu.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-ploidy,Optional,\"Ploidy level of genome (eg., haploid, diploid)\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-propagation,Optional,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIGS.vi.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-propagation,Required,phage: lytic/lysogenic/temperate/obligately lytic; plasmid: incompatibility group; eukaryote: asexual/sexual\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-encoded_traits,Optional,Traits like antibiotic resistance/xenobiotic degration phenotypes/converting phage genes\nbs-estimated_size,Optional,Estimated size of genome\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-num_replicons,Optional,Number of replicons in nuclear genome\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMAG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-derived_from,Optional,Indicates when one BioSample was derived from another BioSample. Value should include BioSample accession number(s) (SAMNxxxxxxxx).\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-metagenome_source,Optional,\"describes the original source of a metagenome assembled genome (MAG). Examples: soil metagenome, gut metagenome\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.specimen.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isol_growth_condt,Required,PMID or url for isolation and growth condition specifications\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-extrachrom_elements,Optional,Plasmids that have significance phenotypic consequence\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMARKS.survey.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIMS.me.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_taxid,Required,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-pathogenicity,Required,To what is the entity pathogenic\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MISAG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-wga_amp_appr,Optional,\"method used to amplify genomic DNA in preparation for sequencing. Examples: MDR, WGA-X, MDA\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.agriculture.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_source,Required,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_age,Required,Age of host at the time of sampling\nbs-host_common_name,Required,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_genotype,Required,\nbs-host_height,Required,the height of subject\nbs-host_length,Required,the length of subject\nbs-host_life_stage,Required,description of host life stage\nbs-host_phenotype,Required,\nbs-host_tot_mass,Required,\"total mass of the host at collection, the unit depends on host\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-microbial_biomass,Required,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Required,reference or method used in determining microbial biomass\nbs-samp_store_dur,Required,\nbs-samp_store_loc,Required,\nbs-sieving,Required,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-soil_type,Required,soil series name or other lower-level classification\nbs-soil_type_meth,Required,reference or method used in determining soil series name or other lower-level classification\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-store_cond,Required,explain how and for how long the soil sample was stored before DNA extraction.\nbs-temp,Required,temperature of the sample at time of sampling\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-isol_growth_condt,Optional,PMID or url for isolation and growth condition specifications\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-photosynt_activ,Optional,Measurement of photosythetic activity (i.e. leaf gas exchange / chlorophyll fluorescence emissions / reflectance / transpiration) Please also include the term method term detailing the method of activity measurement\nbs-photosynt_activ_meth,Optional,Reference or method used in measurement of photosythetic activity\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_depth,Optional,\"The vertical distance below local surface, e.g., for sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples\"\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-trophic_level,Optional,\"Feeding position in food chain (eg., chemolithotroph)\"\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.air.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-altitude,Required,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-barometric_press,Optional,force per unit area exerted against a surface by the weight of air above that surface\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-carb_dioxide,Optional,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-carb_monoxide,Optional,carbon monoxide (gas) amount or concentration at the time of sampling\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-oxygen,Optional,oxygen (gas) amount or concentration at the time of sampling\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pollutants,Optional,\"pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-volatile_org_comp,Optional,concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.built.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-abs_air_humidity,Required,actual mass of water vapor - mh20 - present in the air water vapor mixture\nbs-air_temp,Required,temperature of the air at the time of sampling\nbs-build_occup_type,Required,primary function for which a building or discrete part of a building is intended to be used\nbs-building_setting,Required,location (geography) where a building is set\nbs-carb_dioxide,Required,carbon dioxide (gas) amount or concentration at the time of sampling\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-filter_type,Required,device which removes solid particulates or airborne molecular contaminants\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-heat_cool_type,Required,methods of conditioning or heating a room or building\nbs-indoor_space,Required,\"a distinguishable space within a structure, the purpose for which discrete areas of a building is used\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-light_type,Required,\"application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light\"\nbs-occup_samp,Required,number of occupants present at time of sample within the given space\nbs-occupant_dens_samp,Required,average number of occupants at time of sampling per square footage\nbs-organism_count,Required,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-rel_air_humidity,Required,\"partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-space_typ_state,Required,customary or normal state of the space\nbs-typ_occupant_dens,Required,customary or normal density of occupants\nbs-ventilation_type,Required,ventilation system used in the sampled premises\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-address,Optional,The street name and building number where the sampling occurred\nbs-adj_room,Optional,\"List of rooms (room number, room name) immediately adjacent to the sampling room\"\nbs-aero_struc,Optional,\"Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together, e.g., plane, glider\"\nbs-amount_light,Optional,\"The unit of illuminance and luminous emittance, measuring luminous flux per unit area\"\nbs-arch_struc,Optional,\"An architectural structure is a human-made, free-standing, immobile outdoor construction, e.g., building, shed, home\"\nbs-avg_dew_point,Optional,The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-avg_temp,Optional,The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day\nbs-bathroom_count,Optional,The number of bathrooms in the building\nbs-bedroom_count,Optional,The number of bedrooms in the building\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-build_docs,Optional,\"The building design, construction and operation documents, e.g., building information model, commissioning report, complaint logs, contract administration, cost estimate, janitorial schedules or logs, maintenance plans, schedule, sections, shop drawings, submittals, ventilation system, windows\"\nbs-built_struc_age,Optional,The age of the built structure since construction\nbs-built_struc_set,Optional,\"The characterization of the location of the built structure as high or low human density, e.g., urban, rural\"\nbs-built_struc_type,Optional,A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads\nbs-ceil_area,Optional,The area of the ceiling space within the room\nbs-ceil_cond,Optional,\"The physical condition of the ceiling at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-ceil_finish_mat,Optional,\"The type of material used to finish a ceiling, e.g., drywall, mineral fibre, tiles, PVC, plasterboard, metal, fiberglass, stucco, mineral wool/calcium silicate, wood\"\nbs-ceil_struc,Optional,\"The construction format of the ceiling, e.g., wood frame, concrete\"\nbs-ceil_texture,Optional,\"The feel, appearance, or consistency of a ceiling surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-ceil_thermal_mass,Optional,The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow\nbs-ceil_type,Optional,\"The type of ceiling according to the ceiling's appearance or construction, e.g., cathedral, dropped, concave, barrel-shaped, coffered, cove, stretched\"\nbs-ceil_water_mold,Optional,\"Signs of the presence of mold or mildew on the ceiling, e.g., presence of mold visible, no presence of mold visible\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cool_syst_id,Optional,The cooling system identifier\nbs-date_last_rain,Optional,The date of the last time it rained\nbs-dew_point,Optional,\"temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water.\"\nbs-door_comp_type,Optional,\"The composite type of the door, e.g., metal covered, revolving, sliding, telescopic\"\nbs-door_cond,Optional,\"The physical condition of the door, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-door_direct,Optional,\"The direction the door opens, e.g., inward, outward, sideways\"\nbs-door_loc,Optional,\"The relative location of the door in the room, e.g., north, south, east, west\"\nbs-door_mat,Optional,\"The material the door is composed of, e.g., aluminum, cellular PVC, engineered plastic, fiberboard, fiberglass, metal, thermoplastic alloy, vinyl, wood, wood/plastic composite\"\nbs-door_move,Optional,\"The type of movement of the door, e.g., collapsible, folding, revolving, rolling shutter, sliding, swinging\"\nbs-door_size,Optional,The size of the door\nbs-door_type,Optional,\"The type of door material, e.g., composite, metal, wooden\"\nbs-door_type_metal,Optional,\"The type of metal door, e.g., collapsible, corrugated steel, hollow, rolling shutters, steel plate\"\nbs-door_type_wood,Optional,\"The type of wood door, e.g., bettened and ledged, battened, ledged and braced, battened, ledged and framed, battened, ledged, braced and frame, framed and paneled, glashed or sash, flush, louvered, wire gauged\"\nbs-door_water_mold,Optional,\"Signs of the presence of mold or mildew on a door, e.g., presence of mold visible, no presence of mold visible\"\nbs-drawings,Optional,\"The buildings architectural drawings, e.g., operation, as built, construction, bid, design, building navigation map, diagram, sketch\"\nbs-elevator,Optional,The number of elevators within the built structure\nbs-escalator,Optional,The number of escalators within the built structure\nbs-estimated_size,Optional,Estimated size of genome\nbs-exp_duct,Optional,The amount of exposed ductwork in the room\nbs-exp_pipe,Optional,The number of exposed pipes in the room\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ext_door,Optional,The number of exterior doors in the built structure\nbs-ext_wall_orient,Optional,\"The orientation of the exterior wall, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-ext_window_orient,Optional,\"The compass direction the exterior window of the room is facing, e.g., north, south, east, west, northeast, southeast, southwest, northwest\"\nbs-fireplace_type,Optional,\"A firebox with chimney, e.g., gas burning, wood burning\"\nbs-floor_age,Optional,The time period since installment of the carpet or flooring\nbs-floor_area,Optional,The area of the floor space within the room\nbs-floor_cond,Optional,\"The physical condition of the floor at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-floor_count,Optional,\"The number of floors in the building, including basements and mechanical penthouse\"\nbs-floor_finish_mat,Optional,\"The floor covering type; the finished surface that is walked on, e.g., tile, wood strip or parquet, carpet, rug, laminate wood, lineoleum, vinyl composition tile, sheet vinyl, stone, bamboo, cork, terrazo, concrete, none;specify unfinished, sealed, clear finish, paint\"\nbs-floor_struc,Optional,\"Refers to the structural elements and subfloor upon which the finish flooring is installed, e.g., balcony, floating floor, glass floor, raised floor, sprung floor, wood-framed, concrete\"\nbs-floor_thermal_mass,Optional,The ability of the floor to provide inertia against temperature fluctuations\nbs-floor_water_mold,Optional,\"Signs of the presence of mold or mildew in a room, e.g., mold odor, wet floor, water stains, wall discoloration, floor discoloration, ceiling discoloration, peeling paint or wallpaper, bulging walls, condensation\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-freq_cook,Optional,The number of times a meal is cooked per week\nbs-furniture,Optional,\"The types of furniture present in the sampled room, e.g., cabinet, chair, desks\"\nbs-hall_count,Optional,The total count of hallways and cooridors in the built structure\nbs-handidness,Optional,\"The handidness of the individual sampled, e.g., ambidexterity, left handedness, mixed-handedness, right handedness\"\nbs-heat_deliv_loc,Optional,\"The location of heat delivery within the room, e.g., north, south, east, west\"\nbs-heat_sys_deliv_meth,Optional,\"The method by which the heat is delivered through the system, e.g., conductive, radiant\"\nbs-heat_system_id,Optional,The heating system identifier\nbs-height_carper_fiber,Optional,The average carpet fiber height in the indoor environment\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-inside_lux,Optional,The recorded value at sampling time (power density)\nbs-int_wall_cond,Optional,\"The physical condition of the wall at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture\"\nbs-last_clean,Optional,\"The last time the floor was cleaned (swept, mopped, vacuumed)\"\nbs-max_occup,Optional,The maximum amount of people allowed in the indoor environment\nbs-mech_struc,Optional,\"Mechanical structure: a moving structure, e.g., subway, coach, carriage, elevator, escalator, boat, train, car, bus\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-number_pets,Optional,The number of pets residing in the sampled space\nbs-number_plants,Optional,The number of plant(s) in the sampling space\nbs-number_resident,Optional,The number of individuals currently occupying in the sampling location\nbs-occup_document,Optional,\"The type of documentation of occupancy, e.g., automated count, estimate, manual count, videos\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pres_animal_insect,Optional,\"The type and number of animals or insects present in the sampling space, e.g., cat 10, dog 2, rodent 100, snake 1\"\nbs-quad_pos,Optional,\"The quadrant position of the sampling room within the building, e.g., north side, west side, south side, east side\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_humidity_out,Optional,The recorded outside relative humidity value at the time of sampling\nbs-rel_samp_loc,Optional,\"The sampling location within the train car, e.g., edge of car, center of car, under a seat\"\nbs-room_air_exch_rate,Optional,The rate at which outside air replaces indoor air in a given space\nbs-room_architec_elem,Optional,\"The unique details and component parts that, together, form the architecture of a distinguisahable space within a built structure\"\nbs-room_condt,Optional,\"The condition of the room at the time of sampling, e.g., new, visible wear, needs repair, damaged, rupture, visible signs of mold/mildew\"\nbs-room_connected,Optional,\"List of rooms connected to the sampling room by a doorway, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, office, stairwell\"\nbs-room_count,Optional,The total count of rooms in the built structure including all room types\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-room_door_dist,Optional,Distance between doors (meters) in the hallway between the sampling room and adjacent rooms\nbs-room_door_share,Optional,\"List of room(s) (room number, room name) sharing a door with the sampling room\"\nbs-room_hallway,Optional,\"List of room(s) (room number, room name) located in the same hallway as sampling room\"\nbs-room_loc,Optional,\"The position of the room within the building, e.g., corner room, interior room, exterior wall\"\nbs-room_moist_dam_hist,Optional,The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed\nbs-room_net_area,Optional,The net floor area of sampling room. Net area excludes wall thicknesses\nbs-room_occup,Optional,Count of room occupancy at time of sampling\nbs-room_samp_pos,Optional,\"The horizontal sampling position in the room relative to architectural elements, e.g., north corner, south corner, west corner, east corner, northeast corner, northwest corner, southeast corner, southwest corner, center\"\nbs-room_type,Optional,\"The main purpose or activity of the sampling room. A room is any distinguishable space within a structure, e.g., attic, bathroom, closet, conference room, elevator, examining room, hallway, kitchen, mail room, private office, open office, stairwell,restroom, lobby, vestibule, mechanical or electrical room, data center, laboratory_wet, laboratory_dry, gymnasium, natatorium, auditorium, lockers, cafe, warehouse\"\nbs-room_vol,Optional,Volume of sampling room\nbs-room_wall_share,Optional,\"List of room(s) (room number, room name) sharing a wall with the sampling room\"\nbs-room_window_count,Optional,Number of windows in the room\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_sort_meth,Optional,method by which samples are sorted\nbs-samp_time_out,Optional,The recent and long term history of outside sampling\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_weather,Optional,\"The weather on the sampling day, e.g., clear sky, cloudy, foggy, hail, rain, snow, sleet, sunny, windy\"\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_use,Optional,\"The seasons the space is occupied, e.g., spring, summer, fall, winter\"\nbs-shad_dev_water_mold,Optional,\"Signs of the presence of mold or mildew on the shading device, e.g., presence of mold visible, no presence of mold visible\"\nbs-shading_device_cond,Optional,\"The physical condition of the shading device at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-shading_device_loc,Optional,\"The location of the shading device in relation to the built structure, e.g., exterior, interior\"\nbs-shading_device_mat,Optional,The material the shading device is composed of\nbs-shading_device_type,Optional,\"The type of shading device, e.g., bahama shutters, exterior roll blind, gambrel awning, hood awning, porchroller awning, sarasota shutters, slatted aluminum, solid aluminum awning, sun screen, tree, trellis, venetian awning\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-specific,Optional,\"The building specifications, e.g., operation, as built, construction, bid, design, photos\"\nbs-specific_humidity,Optional,\"The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound\"\nbs-substructure_type,Optional,substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level\nbs-surf_air_cont,Optional,contaminant identified on surface\nbs-surf_humidity,Optional,surfaces: water activity as a function of air and material moisture\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_moisture,Optional,water held on a surface\nbs-surf_moisture_ph,Optional,pH measurement of surface\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-temp_out,Optional,The recorded temperature value at sampling time outside\nbs-train_line,Optional,\"The subway line name, e.g., red, green, orange\"\nbs-train_stat_loc,Optional,\"The train station collection location, e.g., south station above ground, south station underground, south station amtrak, forest hills, riverside\"\nbs-train_stop_loc,Optional,\"The train stop collection location, e.g., end, mid, downtown\"\nbs-vis_media,Optional,\"The building visual media, e.g., photos, videos, commonly of the building, site context (adjacent buildings, vegetation, terrain, streets), interiors, equipment, 3D scans\"\nbs-wall_area,Optional,The total area of the sampled room's walls\nbs-wall_const_type,Optional,\"The building class of the wall defined by the composition of the building elements and fire-resistance rating, e.g., frame construction, joisted masonry, light noncombustible, masonry noncombustible, modified fire resistive, fire resistive\"\nbs-wall_finish_mat,Optional,\"The material utilized to finish the outer most layer of the wall, e.g., plaster, gypsum plaster, veneer plaster, gypsum board, tile, terrazzo, stone facing, acoustical treatment, wood, metal, masonry\"\nbs-wall_height,Optional,The average height of the walls in the sampled room\nbs-wall_loc,Optional,\"The relative location of the wall within the room, e.g., north, south, east, west\"\nbs-wall_surf_treatment,Optional,\"The surface treatment of interior wall, e.g., painted, wall paper, no treatment, paneling, stucco, fabric\"\nbs-wall_texture,Optional,\"The feel, appearance, or consistency of a wall surface, e.g., crows feet, crows-foot stomp, double skip, hawk and trowel, knockdown, popcorn, orange peel, rosebud stomp, Santa-Fe texture, skip trowel, smooth, stomp knockdown, swirl\"\nbs-wall_thermal_mass,Optional,The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint\nbs-wall_water_mold,Optional,\"Signs of the presence of mold or mildew on a wall, e.g., presence of mold visible, no presence of mold visible\"\nbs-water_feat_size,Optional,The size of the water feature\nbs-water_feat_type,Optional,\"The type of water feature present within the building being sampled, e.g., fountain, pool, standing feature, stream, waterfall\"\nbs-weekday,Optional,\"The day of the week when sampling occurred, e.g., monday, tuesday, wednesday, thursday, friday, saturday, sunday\"\nbs-window_cond,Optional,\"The physical condition of the window at the time of sampling, e.g., damaged, needs repair, new, rupture, visible wear\"\nbs-window_cover,Optional,\"The type of window covering, e.g., blinds, curtains, none\"\nbs-window_horiz_pos,Optional,\"The horizontal position of the window on the wall, e.g., left, middle, right\"\nbs-window_loc,Optional,\"The relative location of the window within the room, e.g., north, south, east, west\"\nbs-window_mat,Optional,\"The type of material used to finish a window, e.g., clad, fiberglass, metal, vinyl, wood\"\nbs-window_open_freq,Optional,The number of times windows are opened per week\nbs-window_size,Optional,The window's length and width\nbs-window_status,Optional,\"Defines whether the windows were open or closed during environmental testing, e.g., closed, open\"\nbs-window_type,Optional,\"The type of windows, e.g., single-hung sash window, horizontal sash window, fixed window\"\nbs-window_vert_pos,Optional,\"The vertical position of the window on the wall, e.g., bottom, middle, top, low, middle, high\"\nbs-window_water_mold,Optional,\"Signs of the presence of mold or mildew on the window, e.g., presence of mold visible, no presence of mold visible\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-animal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_origin,Required,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_prod_char,Required,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-intended_consumer,Required,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-animal_am_dur,Optional,The duration of time (days) that the antimicrobial was administered to the food animal\nbs-animal_am_freq,Optional,The frequency per day that the antimicrobial was adminstered to the food animal\nbs-animal_am_route,Optional,The route by which the antimicrobial is adminstered into the body of the food animal\nbs-animal_am_use,Optional,The prescribed intended use of or the condition treated by the antimicrobial given to the food animal by any route of administration\nbs-animal_body_cond,Optional,\"Body condition scoring is a production management tool used to evaluate overall health and nutritional needs of a food animal, e.g., normal, over conditioned, under conditioned\"\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_sex,Optional,\"The sex and reproductive status of the food animal, e.g., castrated female, castrated male, intact female, intact male\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_source_age,Optional,\"The age of the food source host organim. Depending on the type of host organism, age may be more appropriate to report in days, weeks, or years\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-farm.env.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-biotic_regm,Required,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-chem_administration,Required,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-adjacent_environment,Optional,Description of the environmental system or features that are adjacent to the sampling site. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-air_flow_impede,Optional,\"Presence of objects in the area that would influence or impede air flow through the air filter, e.g., obstructed, unobstructed\"\nbs-air_pm_concen,Optional,\"concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM\"\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-anim_water_method,Optional,Description of the equipment or method used to distribute water to livestock. This field accepts terms listed under water delivery equipment (http://opendata.inra.fr/EOL/EOL_0001653). Multiple terms can be separated by pipes\nbs-animal_diet,Optional,\"If the isolate is from a food animal, the type of diet eaten by the food animal. Please list the main food staple and the setting, if appropriate. For a list of acceptable animal feed terms or categories, please see http://www.feedipedia.org. Multiple terms may apply and can be separated by pipes. Food product for animal covers foods intended for consumption by domesticated animals. Consult http://purl.obolibrary.org/obo/FOODON_03309997. If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes. If the proper descriptor is not listed please use text to describe the food product type\"\nbs-animal_feed_equip,Optional,Description of the feeding equipment used for livestock. This field accepts terms listed under feed delivery (http://opendata.inra.fr/EOL/EOL_0001757). Multiple terms can be separated by one or more pipes\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-crop_yield,Optional,Amount of crop produced per unit or area of land\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-date_extr_weath,Optional,\"Date of unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_equip_san,Optional,Method used to sanitize growing and harvesting equipment including type and concentration of sanitizing solution and frequency of sanitization\nbs-farm_equip_san_freq,Optional,\"The number of times farm equipment is cleaned. Frequency of cleaning might be on a daily basis, weekly, monthly, quarterly or annually\"\nbs-farm_equip_shared,Optional,\"List of planting, growing or harvesting equipment shared with other farms\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-fertilizer_date,Optional,\"Date of administration of soil amendment or fertilizer. Multiple terms may apply and can be separated by pipes, listing in reverse chronological order\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_harvest_proc,Optional,\"A harvesting process is a process which takes in some food material from an individual or community of plant or animal organisms in a given context and time, and outputs a precursor or consumable food product. This may include a part of an organism or the whole, and may involve killing the organism\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_medium,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). The name of the medium used to grow the microorganism\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_height,Optional,the height of subject\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_length,Optional,the length of subject\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-humidity,Optional,\"amount of water vapour in the air, at the time of sampling\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_part_maturity,Optional,A description of the stage of development of a plant or plant part based on maturity or ripeness. This field accepts terms listed under degree of plant maturity (http://purl.obolibrary.org/obo/FOODON_03530050)\nbs-plant_reprod_crop,Optional,\"Plant reproductive part used in the field during planting to start the crop, e.g., plant cutting, pregerminated seed, ratoon, seed, seedling, whole mature plant\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-salinity,Optional,salinity measurement\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_store_dur,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season,Optional,The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)\nbs-season_humidity,Optional,Average humidity of the region throughout the growing season\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-soil_conductivity,Optional,Conductivity of soil at time of sampling\nbs-soil_cover,Optional,\"Description of the material covering the sampled soil. This field accepts terms under ENVO:00010483, environmental material\"\nbs-soil_ph,Optional,The pH of soil at time of sampling\nbs-soil_porosity,Optional,Porosity of soil or deposited sediment is volume of voids divided by the total volume of sample\nbs-soil_temp,Optional,Temperature of soil at the time of sampling\nbs-soil_texture_class,Optional,\"One of the 12 soil texture classes use to describe soil texture based on the relative proportion of different grain sizes of mineral particles [sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um)] in a soil, e.g., clay, clay loam, loam, loamy sand, sand, sandy clay, sandy clay loam, sandy loam, silt, silty clay, silty clay loam, silt loam\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-solar_irradiance,Optional,the amount of solar energy that arrives at a specific area of a surface during a specific time interval\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tillage,Optional,note method(s) used for tilling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-ventilation_rate,Optional,ventilation rate of the system in the sampled premises\nbs-ventilation_type,Optional,ventilation system used in the sampled premises\nbs-water_frequency,Optional,Number of water delivery events within a given period of time\nbs-water_ph,Optional,\"The pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid\"\nbs-water_source_adjac,Optional,Description of the environmental features that are adjacent to the farm water source. This field accepts terms under ecosystem (http://purl.obolibrary.org/obo/ENVO_01001110) and human construction (http://purl.obolibrary.org/obo/ENVO_00000070). Multiple terms can be separated by pipes\nbs-water_source_shared,Optional,\"Other users sharing access to the same water source, e.g., multiple users, agricutural, multiple users, no sharing\"\nbs-wind_direction,Optional,wind direction is the direction from which a wind originates\nbs-wind_speed,Optional,speed of wind measured at the time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-human.foods.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cons_food_stor_dur,Optional,\"The storage duration of the food commodity by the consumer, prior to onset of illness or sample collection. Indicate the timepoint written in ISO 8601 format\"\nbs-cons_food_stor_temp,Optional,\"Temperature at which food commodity was stored by the consumer, prior to onset of illness or sample collection\"\nbs-cons_purch_date,Optional,The date a food product was purchased by consumer\nbs-cons_qty_purchased,Optional,The quantity of food purchased by consumer\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-ferm_chem_add,Optional,Any chemicals that are added to the fermentation process to achieve the desired final product\nbs-ferm_chem_add_perc,Optional,The amount of chemical added to the fermentation process\nbs-ferm_headspace_oxy,Optional,The amount of headspace oxygen in a fermentation vessel\nbs-ferm_medium,Optional,\"The growth medium used for the fermented food fermentation process, which supplies the required nutrients. Usually this includes a carbon and nitrogen source, water, micronutrients and chemical additives\"\nbs-ferm_ph,Optional,The pH of the fermented food fermentation process\nbs-ferm_rel_humidity,Optional,The relative humidity of the fermented food fermentation process\nbs-ferm_temp,Optional,The temperature of the fermented food fermentation process\nbs-ferm_time,Optional,The time duration of the fermented food fermentation process\nbs-ferm_vessel,Optional,The type of vessel used for containment of the fermentation\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_qual,Optional,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-microb_start,Optional,Any type of microorganisms used in food production. This field accepts terms listed under live organisms for food production (http://purl.obolibrary.org/obo/FOODON_0344453)\nbs-microb_start_count,Optional,\"Total cell count of starter culture per gram, volume or area of sample and the method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-microb_start_inoc,Optional,The amount of starter culture used to inoculate a new batch\nbs-microb_start_prep,Optional,Information about the protocol or method used to prepare the starter inoculum\nbs-microb_start_source,Optional,\"The source from which the microbial starter culture was sourced. If commercially supplied, list supplier\"\nbs-microb_start_taxid,Optional,\"Please include Genus species and strain ID, if known of microorganisms used in food production. For complex communities, pipes can be used to separate two or more microbes\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_source_mat_cat,Optional,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Optional,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Optional,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-serovar_or_serotype,Optional,A characterization of a cell or microorganism based on the antigenic properties of the molecules on its surface. Indicate the name of a serovar or serotype of interest. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-spikein_amr,Optional,\"Qualitative description of a microbial response to antimicrobial agents. Bacteria may be susceptible or resistant to a broad range of antibiotic drugs or drug classes, with several intermediate states or phases. This field accepts terms under antimicrobial phenotype (http://purl.obolibrary.org/obo/ARO_3004299)\"\nbs-spikein_antibiotic,Optional,\"Antimicrobials used in research study to assess effects of exposure on microbiome of a specific site. Please list antimicrobial, common name and/or class and concentration used for spike-in\"\nbs-spikein_count,Optional,\"Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g., qPCR, atp, mpn, etc.) should also be provided, e.g., total prokaryotes; 3.5e7 cells per ml; qPCR\"\nbs-spikein_growth_med,Optional,\"A liquid or gel containing nutrients, salts, and other factors formulated to support the growth of microorganisms, cells, or plants (National Cancer Institute Thesaurus). A growth medium is a culture medium which has the disposition to encourage growth of particular bacteria to the exclusion of others in the same growth environment. In this case, list the culture medium used to propagate the spike-in bacteria during preparation of spike-in inoculum. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the spike in growth media\"\nbs-spikein_metal,Optional,Heavy metals used in research study to assess effects of exposure on microbiome of a specific site. Please list heavy metals and concentration used for spike-in\nbs-spikein_org,Optional,Taxonomic information about the spike-in organism(s). This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_serovar,Optional,Taxonomic information about the spike-in organism(s) at the serovar or serotype level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-spikein_strain,Optional,Taxonomic information about the spike-in organism(s) at the strain level. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.food-prod.facility.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-coll_site_geo_feat,Required,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-food_contact_surf,Required,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_product_qual,Required,\"Descriptors for describing food visually or via other senses, which is useful for tasks like food inspection where little prior knowledge of how the food came to be is available. Some terms like \"\"food (frozen)\"\" are both a quality descriptor and the output of a process. This field accepts terms listed under food product by quality (http://purl.obolibrary.org/obo/FOODON_00002454)\"\nbs-food_product_type,Required,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-ifsac_category,Required,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-samp_source_mat_cat,Required,This is the scientific role or category that the subject organism or material has with respect to an investigation. This field accepts terms listed under specimen source material category (http://purl.obolibrary.org/obo/GENEPIO_0001237 or http://purl.obolibrary.org/obo/OBI_0100051)\nbs-samp_stor_device,Required,The container used to store the sample. This field accepts terms listed under container (http://purl.obolibrary.org/obo/NCIT_C43186). If the proper descriptor is not listed please use text to describe the storage device\nbs-samp_stor_media,Required,\"The liquid that is added to the sample collection device prior to sampling. If the sample is pre-hydrated, indicate the liquid media the sample is pre-hydrated with for storage purposes. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the sample storage media\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_temp,Optional,temperature of the air at the time of sampling\nbs-area_samp_size,Optional,\"The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected\"\nbs-avg_occup,Optional,Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room\nbs-bacterial_density,Optional,\"Number of bacteria in sample, as defined by bacteria density (http://purl.obolibrary.org/obo/GENEPIO_0000043)\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-cult_result,Optional,\"Any result of a bacterial culture experiment reported as a binary assessment, e.g., absent, active, inactive, negative, no, present, positive, yes\"\nbs-cult_result_org,Optional,Taxonomic information about the cultured organism(s)\nbs-cult_target,Optional,The target microbial analyte in terms of investigation scope. This field accepts terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also accepts identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy\nbs-dietary_claim_use,Optional,\"These descriptors are used either for foods intended for special dietary use as defined in 21 CFR 105 or for foods that have special characteristics indicated in the name or labeling. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510023). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the most prominent dietary claim or use\"\nbs-enrichment_protocol,Optional,The microbiological workflow or protocol followed to test for the presence or enumeration of the target microbial analyte(s). Please provide a PubMed or DOI reference for published protocols\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_allergen_label,Optional,A label indication that the product contains a recognized allergen. This field accepts terms listed under dietary claim or use (http://purl.obolibrary.org/obo/FOODON_03510213)\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_cooking_proc,Optional,\"The transformation of raw food by the application of heat. This field encourages terms listed under food cooking (http://purl.obolibrary.org/obo/FOODON_03450002), e.g., food blanching [FOODON:03470175]\"\nbs-food_dis_point,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_dis_point_city,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that refers to a distribution point along the food chain. This field accepts terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448). Reference: Adam Diamond, James Barham. Moving Food Along the Value Chain: Innovations in Regional Food Distribution. U.S. Dept. of Agriculture, Agricultural Marketing Service. Washington, DC. March 2012. http://dx.doi.org/10.9752/MS045.03-2012\"\nbs-food_ingredient,Optional,\"In this field, please list individual ingredients for multi-component food [FOODON:00002501] and simple foods that is not captured in food_type. Please use terms that are present in FoodOn. Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors\"\nbs-food_name_status,Optional,A datum indicating that use of a food product name is regulated in some legal jurisdiction. This field accepts terms listed under food product name legal status (http://purl.obolibrary.org/obo/FOODON_03530087)\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_capacity,Optional,The maximum number of product units within a package\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_prior_contact,Optional,\"The material the food contacted (e.g., was processed in) prior to packaging. This field accepts terms listed under material of contact prior to food packaging (http://purl.obolibrary.org/obo/FOODON_03530077). If the proper descriptor is not listed please use text to describe the material of contact prior to food packaging\"\nbs-food_prod_char,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, dairy, beef\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_trace_list,Optional,\"The FDA is proposing to establish additional traceability recordkeeping requirements (beyond what is already required in existing regulations) for persons who manufacture, process, pack, or hold foods the Agency has designated for inclusion on the Food Traceability List. The Food Traceability List (FTL) identifies the foods for which the additional traceability records described in the proposed rule would be required. The term \"\"\"\"Food Traceability List\"\"\"\" (FTL) refers not only to the foods specifically listed (https://www.fda.gov/media/142303/download), but also to any foods that contain listed foods as ingredients, e.g., tropical tree fruits\"\nbs-food_trav_mode,Optional,A descriptor for the method of movement of food commodity along the food distribution system. This field accepts terms listed under travel mode (http://purl.obolibrary.org/obo/GENEPIO_0001064). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_trav_vehic,Optional,A descriptor for the mobile machine which is used to transport food commodities along the food distribution system. This field accepts terms listed under vehicle (http://purl.obolibrary.org/obo/ENVO_01000604). If the proper descrptor is not listed please use text to describe the mode of travel. Multiple terms can be separated by one or more pipes\nbs-food_treat_proc,Optional,\"Used to specifically characterize a food product based on the treatment or processes applied to the product or any indexed ingredient. The processes include adding, substituting or removing components or modifying the food or component, e.g., through fermentation. Multiple values can be assigned. This fields accepts terms listed under food treatment process (http://purl.obolibrary.org/obo/FOODON_03460111)\"\nbs-freq_clean,Optional,\"The number of times the sample location is cleaned, e.g., daily, weekly, monthly, quarterly, annually\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-haccp_term,Optional,Hazard Analysis Critical Control Points (HACCP) food safety terms; This field accepts terms listed under HACCP guide food safety term (http://purl.obolibrary.org/obo/FOODON_03530221)\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-hygienic_area,Optional,The subdivision of areas within a food production facility according to hygienic requirements. This field accepts terms listed under hygienic food production area (http://purl.obolibrary.org/obo/ENVO). Please add a term that most accurately indicates the hygienic area your sample was taken from according to the definitions provided\nbs-indoor_surf,Optional,type of indoor surface\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-lot_number,Optional,A distinctive alpha-numeric identification code assigned by the manufacturer or distributor to a specific quantity of manufactured material or product within a batch. The submitter should provide lot number of the item followed by the item name for which the lot number was provided\nbs-microb_cult_med,Optional,\"A culture medium used to select for, grow, and maintain prokaryotic microorganisms. Can be in either liquid (broth) or solidified (e.g. with agar) forms. This field accepts terms listed under microbiological culture medium (http://purl.obolibrary.org/obo/MICRO_0000067). If the proper descriptor is not listed please use text to describe the culture medium\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-num_samp_collect,Optional,The number of samples collected during the current sampling event\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-part_plant_animal,Optional,\"The anatomical part of the organism being involved in food production or consumption; e.g., a carrot is the root of the plant (root vegetable). This field accepts terms listed under part of plant or animal (http://purl.obolibrary.org/obo/FOODON_03420116)\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-prod_label_claims,Optional,\"Labeling claims containing descriptors such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free\"\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-repository,Optional,\"the name of the institution where the sample or DNA extract is held or \"\"sample not available\"\" if the sample was used in its entirety for analysis or otherwise not retained\"\nbs-room_dim,Optional,\"The length, width and height of sampling room\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_collect_method,Optional,The method employed for collecting the sample\nbs-samp_floor,Optional,\"The floor of the building, where the sampling room is located, e.g., 1st floor, 2nd floor, basement, lobby\"\nbs-samp_loc_condition,Optional,\"The condition of the sample location at the time of sampling, e.g., damaged, new, rupture, visible signs of mold-mildew, visible weariness repair\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_pooling,Optional,\"Physical combination of several instances of like material, e.g., RNA extracted from samples or dishes of cell cultures into one big aliquot of cells. Please provide a short description of the samples that were pooled\"\nbs-samp_rep_biol,Optional,Measurements of biologically distinct samples that show biological variation\nbs-samp_rep_tech,Optional,Repeated measurements of the same sample that show independent measures of the noise associated with the equipment and the protocols\nbs-samp_room_id,Optional,Sampling room number. This ID should be consistent with the designations on the building floor plans\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_surf_moisture,Optional,\"Degree of water held on a sampled surface, e.g., intermittent moisture, not present, submerged\"\nbs-samp_transport_cont,Optional,\"Container in which the sample was stored during transport. Indicate the location name, e.g., bottle, cooler, glass vial, plastic vial, vendor supplied container\"\nbs-samp_transport_dur,Optional,The duration of time from when the sample was collected until processed. Indicate the duration for which the sample was stored written in ISO 8601 format\nbs-samp_transport_temp,Optional,\"Temperature at which sample was transported, e.g., -20 or 4 degree Celsius\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-ster_meth_samp_room,Optional,\"The method used to sterilize the sampling room. This field accepts terms listed under electromagnetic radiation (http://purl.obolibrary.org/obo/ENVO_01001026). If the proper descriptor is not listed, please use text to describe the sampling room sterilization method. Multiple terms can be separated by pipes\"\nbs-study_design,Optional,Epidemiological or omics reseach design context that this biosample was used in.\nbs-study_inc_dur,Optional,Sample incubation duration if unpublished or unvalidated method is used. Indicate the timepoint written in ISO 8601 format\nbs-study_inc_temp,Optional,Sample incubation temperature if unpublished or unvalidated method is used\nbs-study_timecourse,Optional,\"For time-course research studies involving samples of the food commodity, indicate the total duration of the time-course study\"\nbs-study_tmnt,Optional,\"A process in which the act is intended to modify or alter some other material entity. From the study design, each treatment is comprised of one level of one or multiple factors. This field accepts terms listed under treatment (http://purl.obolibrary.org/obo/MCO_0000866). If the proper descriptor is not listed please use text to describe the study treatment. Multiple terms can be separated by one or more pipes\"\nbs-subspecf_gen_lin,Optional,\"Information about the genetic distinctness of the lineage (eg., biovar, serovar)\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-timepoint,Optional,Time point at which a sample or observation is made or taken from a biomaterial as measured from some reference point. Indicate the timepoint written in ISO 8601 format\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.host-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_blood_press_diast,Optional,\"resting diastolic blood pressureof the host, measured as mm mercury\"\nbs-host_blood_press_syst,Optional,\"resting systolic blood pressure of the host, measured as mm mercury\"\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-amniotic_fluid_color,Optional,specification of the color of the amniotic fluid sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-blood_blood_disord,Optional,history of blood disorders; can include multiple disorders\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diet_last_six_month,Optional,\"specification of major diet changes in the last six months, if yes the change should be specified\"\nbs-drug_usage,Optional,any drug used by subject and the frequency of usage; can include multiple drugs used\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-foetal_health_stat,Optional,\"specification of foetal health status, should also include abortion\"\nbs-gestation_state,Optional,specification of the gestation state\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_hiv_stat,Optional,\"HIV status of subject, if yes HAART initiation status should also be indicated as [YES or NO]\"\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-kidney_disord,Optional,history of kidney disorders; can include multiple disorders\nbs-maternal_health_stat,Optional,specification of the maternal health status\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_throat_disord,Optional,history of nose-throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pet_farm_animal,Optional,\"specification of presence of pets or farm animals in the environment of subject, if yes the animals should be specified; can include multiple animals present\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pulmonary_disord,Optional,history of pulmonary disorders; can include multiple disorders\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-smoker,Optional,specification of smoking status\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-study_complt_stat,Optional,\"specification of study completion status, if no the reason should be specified\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-travel_out_six_month,Optional,specification of the countries travelled in the last six months; can include multiple travels\nbs-twin_sibling,Optional,specification of twin sibling presence\nbs-urine_collect_meth,Optional,specification of urine collection method\nbs-urogenit_tract_disor,Optional,history of urogenitaltract disorders; can include multiple disorders\nbs-weight_loss_3_month,Optional,\"specification of weight loss in the last three months, if yes should be further specified to include amount of weight loss\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-gut.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gastrointest_disord,Optional,history of gastrointestinal tract disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-liver_disord,Optional,history of liver disorders; can include multiple disorders\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-special_diet,Optional,specification of special diet; can include multiple special diets\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-oral.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nose_mouth_teeth_throat_disord,Optional,history of nose/mouth/teeth/throat disorders; can include multiple disorders\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_last_toothbrush,Optional,specification of the time since last toothbrushing\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-skin.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-dermatology_disord,Optional,history of dermatology disorders; can include multiple disorders\nbs-dominant_hand,Optional,dominant hand of the subject\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-time_since_last_wash,Optional,specification of the time since last wash\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.human-vaginal.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-birth_control,Optional,specification of birth control medication used\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-douche,Optional,date of most recent douche\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethnicity,Optional,ethnicity of the subject\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gynecologic_disord,Optional,history of gynecological disorders; can include multiple disorders\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_mass_index,Optional,\"body mass index of the host, calculated as weight/(height)squared\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_body_temp,Optional,core body temperature of the host when sample was collected\nbs-host_diet,Optional,\"type of diet depending on the sample for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_last_meal,Optional,content of last meal and time since feeding; can include multiple values\nbs-host_occupation,Optional,most frequent job performed by subject\nbs-host_phenotype,Optional,\nbs-host_pulse,Optional,\"resting pulse of the host, measured as beats per minute\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-hrt,Optional,\"whether subject had hormone replacement theraphy, and if yes start date\"\nbs-hysterectomy,Optional,specification of whether hysterectomy was performed\nbs-ihmc_medication_code,Optional,can include multiple medication codes\nbs-medic_hist_perform,Optional,whether full medical history was collected\nbs-menarche,Optional,date of most recent menstruation\nbs-menopause,Optional,date of onset of menopause\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pregnancy,Optional,date due of pregnancy\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sexual_act,Optional,current sexual partner and frequency of sex\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-urogenit_disord,Optional,\"history of urogenital disorders, can include multiple disorders\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.hydrocarbon-cores.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-hcr_temp,Required,Original temperature of the hydrocarbon resource\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sulfate_fw,Required,Original sulfate concentration in the hydrocarbon resource\nbs-temp,Required,temperature of the sample at time of sampling\nbs-vfa_fw,Required,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-owc_tvdss,Optional,Depth of the original oil water contact (OWC) zone (average) (m TVDSS)\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-permeability,Optional,Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences)\nbs-ph,Optional,pH measurement\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_md,Optional,\"In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"\"other\"\" is specified, please propose entry in \"\"additional info\"\" field\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_tvdss,Optional,\"Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g., 1325.75-1362.25 m\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sr_dep_env,Optional,\"Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock), e.g., lacustine, fluvioldeltaic, fluviomarine, marine\"\nbs-sr_geol_age,Optional,\"Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-sr_kerog_type,Optional,\"Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen), e.g., type I, type II, type III, type IV\"\nbs-sr_lithology,Optional,\"Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock), e.g., clastic, carbonate, coal, biosilicieous\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.hydrocarbon-fluids.swabs.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-add_recov_method,Required,\"Additional (i.e. secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them, e.g., water injection {timestamp}, dump flood {timestamp}, gas injection {timestamp}, wag immiscible injection {timestamp}, polymer addition {timestamp}, surfactant addition {timestamp}\"\nbs-api,Required,\"API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity), e.g. 31.1 API\"\nbs-basin_name,Required,\"Name of the basin, e.g. Campos\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-hc_produced,Required,\"Main hydrocarbon type produced from resource, e.g., oil, gas-condensate, gas, bitumen, coalbed methane\"\nbs-hcr,Required,\"Main hydrocarbon resource type. The term Hydrocarbon Resource is defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation, e.g., oil reservoir, gas reservoir, oil sand, coalbed, shale, tight oil reservoir, tight gas reservoir\"\nbs-iwf,Required,\"Proportion of the produced fluids derived from injected water at the time of sampling, e.g., 87%\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-nitrate,Required,concentration of nitrate\nbs-samp_collect_point,Required,\"Sampling point on the asset where sample was collected, e.g., well, test well, drilling rig, wellhead, separator, storage tank\"\nbs-samp_mat_type,Required,\"The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sulfate,Required,concentration of sulfate\nbs-sulfide,Required,concentration of sulfide\nbs-temp,Required,temperature of the sample at time of sampling\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-water_cut,Required,Current amount of water (%) in a produced fluid stream; or the average of the combined streams\nbs-additional_info,Optional,Information that doesn't fit anywhere else\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-ammonium,Optional,concentration of ammonium\nbs-aromatics_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-asphaltenes_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-benzene,Optional,Concentration of benzene in the sample\nbs-biocide_admin,Optional,List of biocides (commercial name of product and supplier) and date of administration\nbs-biocide_admin_method,Optional,\"Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling), e.g., 150 mg/l; weekly; 4 hr; 3 days\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-calcium,Optional,concentration of calcium\nbs-chem_treat_method,Optional,\"Method of chemical administration, dose, frequency, duration, time elapsed between administration and sampling, e.g., 50 mg/l; twice a week; 1 hr; 0 days\"\nbs-chem_treatment,Optional,\"List of chemical compounds administered upstream the sampling location where sampling occurred, e.g., glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals. The commercial name of the product and name of the supplier should be provided. The date of administration should also be included\"\nbs-chloride,Optional,concentration of chloride\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depos_env,Optional,\"Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment), e.g., continental - alluvial, continental - aeolian, continental - fluvial, continental - lacustrine, transitional - deltaic, transitional - tidal, transitional - lagoonal, transitional - beach, transitional - lake, marine - shallow, marine - deep, marine - reef, other - evaporite, other - glacial, other - volcanic\"\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_iron,Optional,Concentration of dissolved iron in the sample\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_oxygen_fluid,Optional,\"Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxgen-corrosion and microbial activity, e.g. Mic\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-ethylbenzene,Optional,Concentration of ethylbenzene in the sample\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-field,Optional,\"Name of the hydrocarbon field, e.g., Albacora\"\nbs-hcr_fw_salinity,Optional,Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS\nbs-hcr_geol_age,Optional,\"Geological age of hydrocarbon resource (additional info: https://en.wikipedia.org/wiki/Period_(geology)), e.g., archean, cambrian, carboniferous, cenozoic, cretaceous, devonian, jurassic, mesozoic, neogene, ordovician, paleogene, paleozoic, permian, precambrian, proterozoic, silurian, triassic\"\nbs-hcr_pressure,Optional,Original pressure of the hydrocarbon resource\nbs-hcr_temp,Optional,Original temperature of the hydrocarbon resource\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-iw_bt_date_well,Optional,Injection water breakthrough date per well following a secondary and/or tertiary recovery\nbs-lithology,Optional,\"Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination), e.g., basement, chalk, chert, coal, conglomerate, diatomite, dolomite, limestone, sandstone, shale, siltstone, volcanic\"\nbs-magnesium,Optional,concentration of magnesium\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrite,Optional,concentration of nitrite\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_count_qpcr_info,Optional,\"If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided, e.g., 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pour_point,Optional,\"Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high pour point is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material (source: https://en.wikipedia.org/wiki/pour_point)\"\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-prod_rate,Optional,\"Oil and/or gas production rates per well, e.g., 524 m3/day\"\nbs-prod_start_date,Optional,Date of field's first production\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-reservoir_name,Optional,\"Name of the reservoir, e.g., Carapebus\"\nbs-resins_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_loc_corr_rate,Optional,\"Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_preserv,Optional,\"Preservative added to the sample, e.g. Rnalater, alcohol, formaldehyde. Where appropriate include volume added, e.g. Rnalater; 2 ml\"\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_subtype,Optional,\"Name of sample sub-type, e.g., oil phase, water phase, biofilm, not applicable\"\nbs-samp_transport_cond,Optional,\"Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g., 5.5 days; 20C)\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-samp_well_name,Optional,\"Name of the well where sample was taken, e.g., BXA1123\"\nbs-saturates_pc,Optional,\"Saturate, Aromatic, Resin and Asphaltene (SARA) is an analysis method that divides crude oil components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate_fw,Optional,Original sulfate concentration in the hydrocarbon resource\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-tan,Optional,Total Acid Number (TAN) is a measurement of acidity that is determined by the amount of potassium hydroxide in milligrams that is needed to neutralize the acids in one gram of oil. It is an important quality measurement of crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)\nbs-toluene,Optional,Concentration of toluene in the sample\nbs-tot_iron,Optional,Concentration of total iron in the sample\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-tot_sulfur,Optional,Concentration of total sulfur in the sample\nbs-tvdss_of_hcr_press,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured, e.g., 1578 m\"\nbs-tvdss_of_hcr_temp,Optional,\"True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured, e.g., 1345 m\"\nbs-vfa,Optional,Concentration of Volatile Fatty Acids in the sample\nbs-vfa_fw,Optional,Original volatile fatty acid concentration in the hydrocarbon resource\nbs-viscosity,Optional,\"A measure of oil's resistance to gradual deformation by shear stress or tensile stress (e.g., 3.5 cp; 100C)\"\nbs-water_prod_rate,Optional,\"Water production rates per well, e.g., 987 m3/day\"\nbs-win,Optional,A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)\nbs-xylene,Optional,Concentration of xylene in the sample\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.microbial.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tot_carb,Optional,total carbon content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.miscellaneous.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ammonium,Optional,concentration of ammonium\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.plant-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-air_temp_regm,Optional,\"information about treatment involving an exposure to varying temperatures; should include the temperature, treatment duration, interval and total experimental duration; can include different temperature regimens\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-ances_data,Optional,\"Information about either pedigree or other ancestral information description, e.g., parental variety in case of mutant or selection, A/3*B (meaning [(A x B) x B] x B)\"\nbs-antibiotic_regm,Optional,\"information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment duration, interval and total experimental duration; can include multiple antibiotic regimens\"\nbs-biol_stat,Optional,\"The level of genome modification, e.g., wild, natural, semi-natural, inbred line, breeder's line, hybrid, clonal selection, mutant\"\nbs-biotic_regm,Optional,\"Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_mutagen,Optional,\"treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment duration, interval and total experimental duration; can include multiple mutagen regimens\"\nbs-climate_environment,Optional,treatment involving an exposure to a particular climate; can include multiple climates\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-cult_root_med,Optional,\"Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g., Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fertilizer_regm,Optional,\"information about treatment involving the use of fertilizers; should include the name fertilizer, amount administered, treatment duration, interval and total experimental duration; can include multiple fertilizer regimens\"\nbs-fungicide_regm,Optional,\"information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment duration, interval and total experimental duration; can include multiple fungicide regimens\"\nbs-gaseous_environment,Optional,\"use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens\"\nbs-genetic_mod,Optional,\"Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection\"\nbs-gravity,Optional,\"information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; can include multiple treatments\"\nbs-growth_facil,Optional,\"Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research\"\nbs-growth_habit,Optional,\"Characteristic shape, appearance or growth form of a plant species, e.g., erect, semi-erect, spreading, prostrate\"\nbs-growth_hormone_regm,Optional,\"information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment duration, interval and total experimental duration; can include multiple growth hormone regimens\"\nbs-herbicide_regm,Optional,\"information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_genotype,Optional,\nbs-host_height,Optional,the height of subject\nbs-host_length,Optional,the length of subject\nbs-host_life_stage,Optional,description of host life stage\nbs-host_phenotype,Optional,\nbs-host_subspecf_genlin,Optional,\"Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123\"\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-host_wet_mass,Optional,measurement of wet mass\nbs-humidity_regm,Optional,\"information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment duration, interval and total experimental duration; can include multiple regimens\"\nbs-light_regm,Optional,\"Information about treatment(s) involving exposure to light, including both light intensity and quality\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-mineral_nutr_regm,Optional,\"information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple mineral nutrient regimens\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-non_mineral_nutr_regm,Optional,\"information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment duration, interval and total experimental duration; can include multiple non-mineral nutrient regimens\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pesticide_regm,Optional,\"information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment duration, interval and total experimental duration; can include multiple pesticide regimens\"\nbs-ph_regm,Optional,information about treatment involving exposure of plants to varying levels of pH of the growth media; can include multiple regimen\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_product,Optional,\"substance produced by the plant, where the sample was obtained from\"\nbs-plant_sex,Optional,\"Sex of the reproductive parts on the whole plant, e.g., androdioecious, androecious, androgynous, androgynomonoecious, andromonoecious, bisexual, dichogamous, diclinous, dioecious, gynodioecious, gynoecious, gynomonoecious, hermaphroditic, imperfect, monoclinous, monoecious, perfect, polygamodioecious, polygamomonoecious, polygamous, protandrous, protogynous, subandroecious, subdioecious, subgynoecious, synoecious, trimonoecious, trioecious, unisexual\"\nbs-plant_struc,Optional,\"Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g., petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-radiation_regm,Optional,\"information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment duration, interval and total experimental duration; can include multiple radiation regimens\"\nbs-rainfall_regm,Optional,information about treatment involving an exposure to a given amount of rainfall; can include multiple regimens\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-root_cond,Optional,\"Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container\"\nbs-root_med_carbon,Optional,\"Source of organic carbon in the culture rooting medium, e.g., sucrose\"\nbs-root_med_macronutr,Optional,\"Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S), e.g., KH2PO4 (170mg/L)\"\nbs-root_med_micronutr,Optional,\"Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo), e.g., H3BO3 (6.2mg/L)\"\nbs-root_med_ph,Optional,\"pH measurement of the culture rooting medium, e.g., 5.5\"\nbs-root_med_regl,Optional,\"Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid, e.g., 0.5 mg/L NAA\"\nbs-root_med_solid,Optional,\"Specification of the solidifying agent in the culture rooting medium, e.g., agar\"\nbs-root_med_suppl,Optional,\"Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal, e.g., nicotinic acid (0.5 mg/L)\"\nbs-salt_regm,Optional,\"information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment duration, interval and total experimental duration; can include multiple salt regimens\"\nbs-samp_capt_status,Optional,\"Reason for the sample, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, farm sample, market sample\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_dis_stage,Optional,\"Stage of the disease at the time of sample collection, e.g., dissemination, growth and reproduction, infection, inoculation, penetration\"\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_environment,Optional,\"treatment involving an exposure to a particular season (e.g. winter, summer, rabi, rainy etc.)\"\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-standing_water_regm,Optional,\"treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water; can include multiple regimens\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tiss_cult_growth_med,Optional,description of plant tissue culture growth media used\nbs-water_temp_regm,Optional,information about treatment involving an exposure to water with varying degree of temperature; can include multiple regimens\nbs-watering_regm,Optional,information about treatment involving an exposure to watering frequencies; can include multiple regimens\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.sediment.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-methane,Optional,methane (gas) amount or concentration at the time of sampling\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-particle_class,Optional,\"particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-porosity,Optional,porosity of deposited sediment is volume of voids divided by the total volume of sample\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-sediment_type,Optional,information about the sediment type based on major constituents\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sodium,Optional,sodium concentration\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_carb,Optional,total carbon content\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-turbidity,Optional,turbidity measurement\nbs-water_content,Optional,water content measurement\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.soil.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Required,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-agrochem_addition,Optional,\"addition of fertilizers, pesticides, etc. - amount and time of applications\"\nbs-al_sat,Optional,aluminum saturation (esp. for tropical soils)\nbs-al_sat_meth,Optional,reference or method used in determining Al saturation\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-annual_precpt,Optional,\"The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-annual_temp,Optional,Mean annual temperature\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-crop_rotation,Optional,\"whether or not crop is rotated, and if yes, rotation schedule\"\nbs-cur_land_use,Optional,present state of sample site\nbs-cur_vegetation,Optional,\"vegetation classification from one or more standard classification systems, or agricultural crop\"\nbs-cur_vegetation_meth,Optional,reference or method used in vegetation classification\nbs-drainage_class,Optional,drainage classification from a standard system such as the USDA system\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-extreme_event,Optional,unusual physical events that may have affected microbial populations\nbs-fao_class,Optional,soil classification from the FAO World Reference Database for Soil Resources\nbs-fire,Optional,historical and/or physical evidence of fire\nbs-flooding,Optional,historical and/or physical evidence of flooding\nbs-heavy_metals,Optional,heavy metals present and concentrationsany drug used by subject and the frequency of usage; can include multiple heavy metals and concentrations\nbs-heavy_metals_meth,Optional,reference or method used in determining heavy metals\nbs-horizon_meth,Optional,reference or method used in determining the horizon\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-link_addit_analys,Optional,\nbs-link_class_info,Optional,link to digitized soil maps or other soil classification information\nbs-link_climate_info,Optional,link to climate resource\nbs-local_class,Optional,soil classification based on local soil classification system\nbs-local_class_meth,Optional,reference or method used in determining the local soil classification\nbs-microbial_biomass,Optional,\"the part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 \u00b5m. IF you keep this, you would need to have correction factors used for conversion to the final units, which should be mg C (or N)/kg soil).\"\nbs-microbial_biomass_meth,Optional,reference or method used in determining microbial biomass\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-ph,Optional,pH measurement\nbs-ph_meth,Optional,reference or method used in determining pH\nbs-pool_dna_extracts,Optional,were multiple DNA extractions mixed? how many?\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-previous_land_use,Optional,previous land use and dates\nbs-previous_land_use_meth,Optional,reference or method used in determining previous land use and dates\nbs-profile_position,Optional,cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity_meth,Optional,reference or method used in determining salinity\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-season_precpt,Optional,\"The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps\"\nbs-season_temp,Optional,Mean seasonal temperature\nbs-sieving,Optional,collection design of pooled samples and/or sieve size and amount of sample sieved\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-slope_aspect,Optional,\"the direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees); e.g., NW or 315\u00b0. This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.\"\nbs-slope_gradient,Optional,commonly called \u201cslope.\u201d The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer.\nbs-soil_horizon,Optional,specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath\nbs-soil_text_measure,Optional,\"the relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.\"\nbs-soil_texture_meth,Optional,reference or method used in determining soil texture\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-soil_type_meth,Optional,reference or method used in determining soil series name or other lower-level classification\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-tillage,Optional,note method(s) used for tilling\nbs-tot_n_meth,Optional,reference or method used in determining the total N\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_nitro_cont_meth,Optional,Reference or method used in determining the total nitrogen\nbs-tot_org_c_meth,Optional,reference or method used in determining total organic C\nbs-tot_org_carb,Optional,Definition for soil: total organic C content of the soil units of g C/kg soil. Definition otherwise: total organic carbon content\nbs-water_content,Optional,water content measurement\nbs-water_content_soil_meth,Optional,reference or method used in determining the water content of soil\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.symbiont-associated.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host_dependence,Required,\"Type of host dependence for the symbiotic host organism to its host., e.g., facultative, obligate\"\nbs-host_life_stage,Required,description of host life stage\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-sym_life_cycle_type,Required,\"Type of life cycle of the symbiotic host species (the thing being sampled). Simple life cycles occur within a single host, complex ones within multiple different hosts over the course of their normal life cycle, e.g., complex life cycle, simple life cycle\"\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-association_duration,Optional,Time spent in host of the symbiotic organism at the time of sampling; relevant scale depends on symbiotic organism and study\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gravidity,Optional,\"whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_body_habitat,Optional,original body habitat where the sample was obtained from\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_cellular_loc,Optional,\"The localization of the symbiotic host organism within the host from which it was sampled, e.g., intracellular, extracellular\"\nbs-host_color,Optional,the color of host\nbs-host_common_name,Optional,\"The natural language (non-taxonomic) name of the host organism, e.g., mouse\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_dry_mass,Optional,measurement of dry mass\nbs-host_family_relationship,Optional,\nbs-host_genotype,Optional,\nbs-host_growth_cond,Optional,literature reference giving growth conditions of the host\nbs-host_height,Optional,the height of subject\nbs-host_infra_specific_name,Optional,taxonomic information subspecies level\nbs-host_infra_specific_rank,Optional,\"taxonomic rank information below subspecies level, such as variety, form, rank etc.\"\nbs-host_length,Optional,the length of subject\nbs-host_number,Optional,Number of symbiotic host individuals pooled at the time of collection\nbs-host_of_host_coinf,Optional,\"The taxonomic name of any coinfecting organism observed in a symbiotic relationship with the host of the sampled host organism, e.g. where a sample collected from a host trematode species (A) which was collected from a host_of_host fish (B) that was also infected with a nematode (C), the value here would be (C) the nematode {species name} or {common name}. Multiple co-infecting species may be added in a comma-separated list. For listing symbiotic organisms associated with the host (A) use the term Observed host symbiont\"\nbs-host_of_host_disease,Optional,\"List of diseases with which the host of the symbiotic host organism has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text\"\nbs-host_of_host_env_loc,Optional,\"For a symbiotic host organism the local anatomical environment within its host may have causal influences. Report the anatomical entity(s) which are in the direct environment of the symbiotic host organism being sampled and which you believe have significant causal influences on your sample or specimen. For example, if the symbiotic host organism being sampled is an intestinal worm, its local environmental context will be the term for intestine from UBERON (http://uberon.github.io/)\"\nbs-host_of_host_env_med,Optional,\"Report the environmental material(s) immediately surrounding the symbiotic host organism at the time of sampling. This usually will be a tissue or substance type from the host, but may be another material if the symbiont is external to the host. We recommend using classes from the UBERON ontology, but subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483) may also be used. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS. Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g., air, water, blood) and not discrete, countable entities (e.g., intestines, heart)\"\nbs-host_of_host_fam_rel,Optional,Familial relationship of the host of the symbiotic host organisms to other hosts of symbiotic host organism in the same study; can include multiple relationships\nbs-host_of_host_geno,Optional,Observed genotype of the host of the symbiotic host organism\nbs-host_of_host_gravid,Optional,\"Whether or not the host of the symbiotic host organism is gravid, and if yes date due or date post-conception, specifying which is used\"\nbs-host_of_host_infname,Optional,Taxonomic name information of the host of the symbiotic host organism below subspecies level\nbs-host_of_host_infrank,Optional,\"Taxonomic rank information about the host of the symbiotic host organism below subspecies level, such as variety, form, rank\"\nbs-host_of_host_name,Optional,Common name of the host of the symbiotic host organism\nbs-host_of_host_pheno,Optional,\"Phenotype of the host of the symbiotic host organism. For phenotypic quality ontology (PATO) terms, see http://purl.bioontology.org/ontology/pato\"\nbs-host_of_host_sub_id,Optional,\"A unique identifier by which each host of the symbiotic host organism subject can be referred to, de-identified, e.g. #H14\"\nbs-host_of_host_taxid,Optional,NCBI taxon id of the host of the symbiotic host organism\nbs-host_of_host_totmass,Optional,\"Total mass of the host of the symbiotic host organism at collection, the unit depends on the host\"\nbs-host_phenotype,Optional,\nbs-host_sex,Optional,Biological sex of the host\nbs-host_shape,Optional,morphological shape of host\nbs-host_specificity,Optional,\"Level of specificity of symbiont-host interaction, e.g., family-specific, generalist, genus-specific, species-specific\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_substrate,Optional,the growth substrate of the host\nbs-host_symbiont,Optional,\"The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_tot_mass,Optional,\"total mass of the host at collection, the unit depends on host\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-mode_transmission,Optional,\"The process through which the symbiotic host organism entered the host from which it was sampled, e.g., horizontal:castrator, horizontal:directly transmitted, horizontal:micropredator, horizontal:parasitoid, horizontal:trophically transmitted, horizontal:vector transmitted, vertical\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-route_transmission,Optional,\"Description of path taken by the symbiotic host organism being sampled in order to establish a symbiotic relationship with the host (with which it was observed at the time of sampling) via a mode of transmission (specified in mode_transmission), e.g., environmental:faecal-oral, transplacental, vector-borne:vector penetration\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_sol,Optional,\"Solution within which sample was stored, if any\"\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-symbiont_host_role,Optional,\"Role of the host in the life cycle of the symbiotic organism, e.g., accidental, dead-end, definitive, intermediate, paratenic, reservoir, single host\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-type_of_symbiosis,Optional,\"Type of biological interaction established between the symbiotic host organism being sampled and its respective host, e.g., commensalistic, mutualistic, parasitic\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.wastewater.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-biochem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chem_oxygen_dem,Optional,a measure of the relative oxygen-depletion effect of a waste contaminant\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-efficiency_percent,Optional,percentage of volatile solids removed from the anaerobic digestor\nbs-emulsions,Optional,\"amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types\"\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-gaseous_substances,Optional,\"amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-indust_eff_percent,Optional,percentage of industrial effluents received by wastewater treatment plant\nbs-inorg_particles,Optional,\"concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles\"\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_particles,Optional,\"concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc.\"\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-ph,Optional,pH measurement\nbs-phosphate,Optional,concentration of phosphate\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-pre_treatment,Optional,the process of pre-treatment removes materials that can be easily collected from the raw wastewater\nbs-primary_treatment,Optional,the process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed\nbs-reactor_type,Optional,\"anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_salinity,Optional,\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-secondary_treatment,Optional,the process for substantially degrading the biological content of the sewage\nbs-sewage_type,Optional,type of wastewater treatment plant as municipial or industrial\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-sludge_retent_time,Optional,the time activated sludge remains in reactor\nbs-sodium,Optional,sodium concentration\nbs-soluble_inorg_mat,Optional,\"concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc.\"\nbs-soluble_org_mat,Optional,\"concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc.\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-suspend_solids,Optional,\"concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter, etc,; can include multiple substances\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tertiary_treatment,Optional,the process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_phosphate,Optional,total amount or concentration of phosphate\nbs-wastewater_type,Optional,\"the origin of wastewater such as human waste, rainfall, storm drains, etc.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.MIUVIG.water.6.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-depth,Required,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Required,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Required,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Required,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-source_uvig,Required,Type of dataset from which the UViG was obtained\nbs-virus_enrich_appr,Required,\"Approach used to enrich the sample for viruses, if any. If more than one approach was used, include multiple \u2018virus_enrich_appr\u2019 fields.\"\nbs-alkalinity,Optional,\"alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate\"\nbs-alkalinity_method,Optional,Method used for alkalinity measurement\nbs-alkyl_diethers,Optional,concentration of alkyl diethers\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-aminopept_act,Optional,measurement of aminopeptidase activity\nbs-ammonium,Optional,concentration of ammonium\nbs-atmospheric_data,Optional,measurement of atmospheric data; can include multiple data\nbs-bac_prod,Optional,bacterial production in the water column measured by isotope uptake\nbs-bac_resp,Optional,measurement of bacterial respiration in the water column\nbs-bacteria_carb_prod,Optional,measurement of bacterial carbon production\nbs-biomass,Optional,\"amount of biomass; should include the name for the part of biomass measured, e.g. microbial, total. can include multiple measurements\"\nbs-biotic_relationship,Optional,Free-living or from host (define relationship)\nbs-bishomohopanol,Optional,concentration of bishomohopanol\nbs-bromide,Optional,concentration of bromide\nbs-calcium,Optional,concentration of calcium\nbs-carb_nitro_ratio,Optional,ratio of amount or concentrations of carbon to nitrogen\nbs-chem_administration,Optional,\"list of chemical compounds administered to the host or site where sampling occurred, and when (e.g. antibiotics, N fertilizer, air filter); can include multiple compounds. For Chemical Entities of Biological Interest ontology (CHEBI) (v1.72), please see http://bioportal.bioontology.org/visualize/44603\"\nbs-chloride,Optional,concentration of chloride\nbs-chlorophyll,Optional,concentration of chlorophyll\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-conduc,Optional,electrical conductivity of water\nbs-density,Optional,density of sample\nbs-diether_lipids,Optional,concentration of diether lipids; can include multiple types of diether lipids\nbs-diss_carb_dioxide,Optional,concentration of dissolved carbon dioxide\nbs-diss_hydrogen,Optional,concentration of dissolved hydrogen\nbs-diss_inorg_carb,Optional,dissolved inorganic carbon concentration\nbs-diss_inorg_nitro,Optional,concentration of dissolved inorganic nitrogen\nbs-diss_inorg_phosp,Optional,concentration of dissolved inorganic phosphorus\nbs-diss_org_carb,Optional,concentration of dissolved organic carbon\nbs-diss_org_nitro,Optional,dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2\nbs-diss_oxygen,Optional,concentration of dissolved oxygen\nbs-down_par,Optional,visible waveband radiance and irradiance measurements in the water column\nbs-elev,Optional,The elevation of the sampling site as measured by the vertical distance from mean sea level.\nbs-estimated_size,Optional,Estimated size of genome\nbs-experimental_factor,Optional,Variable aspect of experimental design\nbs-fluor,Optional,raw or converted fluorescence of water\nbs-glucosidase_act,Optional,measurement of glucosidase activity\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_taxid,Optional,\"NCBI taxonomy ID of the host, e.g. 9606\"\nbs-light_intensity,Optional,measurement of light intensity\nbs-magnesium,Optional,concentration of magnesium\nbs-mean_frict_vel,Optional,measurement of mean friction velocity\nbs-mean_peak_frict_vel,Optional,measurement of mean peak friction velocity\nbs-misc_param,Optional,\"any other measurement performed or parameter collected, that is not listed here\"\nbs-n_alkanes,Optional,concentration of n-alkanes; can include multiple n-alkanes\nbs-neg_cont_type,Optional,\"The substance or equipment used as a negative control in an investigation, e.g., distilled water, phosphate buffer, empty collection device, empty collection tube, DNA-free PCR mix, sterile swab, sterile syringe\"\nbs-nitrate,Optional,concentration of nitrate\nbs-nitrite,Optional,concentration of nitrite\nbs-nitro,Optional,concentration of nitrogen (total)\nbs-omics_observ_id,Optional,\"A unique identifier of the omics-enabled observatory (or comparable time series) your data derives from. This identifier should be provided by the OMICON ontology; if you require a new identifier for your time series, contact the ontology's developers. Information is available here: https://github.com/GLOMICON/omicon. This field is only applicable to records which derive from an omics time-series or observatory.\"\nbs-org_carb,Optional,concentration of organic carbon\nbs-org_matter,Optional,concentration of organic matter\nbs-org_nitro,Optional,concentration of organic nitrogen\nbs-organism_count,Optional,\"total count of any organism per gram or volume of sample,should include name of organism followed by count; can include multiple organism counts\"\nbs-oxy_stat_samp,Optional,oxygenation status of sample\nbs-part_org_carb,Optional,concentration of particulate organic carbon\nbs-part_org_nitro,Optional,concentration of particulate organic nitrogen\nbs-pathogenicity,Optional,To what is the entity pathogenic\nbs-perturbation,Optional,\"type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with time that perturbation occurred; can include multiple perturbation types\"\nbs-petroleum_hydrocarb,Optional,concentration of petroleum hydrocarbon\nbs-ph,Optional,pH measurement\nbs-phaeopigments,Optional,concentration of phaeopigments; can include multiple phaeopigments\nbs-phosphate,Optional,concentration of phosphate\nbs-phosplipid_fatt_acid,Optional,concentration of phospholipid fatty acids; can include multiple values\nbs-photon_flux,Optional,measurement of photon flux\nbs-pos_cont_type,Optional,\"The substance, mixture, product, or apparatus used to verify that a process which is part of an investigation delivers a true positive\"\nbs-potassium,Optional,concentration of potassium\nbs-pressure,Optional,\"pressure to which the sample is subject, in atmospheres\"\nbs-primary_prod,Optional,measurement of primary production\nbs-redox_potential,Optional,\"redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-salinity,Optional,salinity measurement\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-samp_store_dur,Optional,\nbs-samp_store_loc,Optional,\nbs-samp_store_temp,Optional,\nbs-samp_vol_we_dna_ext,Optional,volume (mL) or weight (g) of sample processed for DNA extraction\nbs-silicate,Optional,concentration of silicate\nbs-size_frac,Optional,\"Filtering pore size used in sample preparation, e.g., 0-0.22 micrometer\"\nbs-size_frac_low,Optional,Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials larger than the size threshold are excluded from the sample\nbs-size_frac_up,Optional,Refers to the mesh/pore size used to retain the sample. Materials smaller than the size threshold are excluded from the sample\nbs-sodium,Optional,sodium concentration\nbs-soluble_react_phosp,Optional,concentration of soluble reactive phosphorus\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-sulfate,Optional,concentration of sulfate\nbs-sulfide,Optional,concentration of sulfide\nbs-suspend_part_matter,Optional,concentration of suspended particulate matter\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-tidal_stage,Optional,stage of tide\nbs-tot_depth_water_col,Optional,measurement of total depth of water column\nbs-tot_diss_nitro,Optional,\"total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen\"\nbs-tot_inorg_nitro,Optional,total inorganic nitrogen content\nbs-tot_nitro,Optional,total nitrogen content of the sample\nbs-tot_part_carb,Optional,total particulate carbon content\nbs-tot_phosp,Optional,\"total phosphorus concentration, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus. Can also be measured without filtering, reported as phosphorus\"\nbs-turbidity,Optional,turbidity measurement\nbs-water_current,Optional,measurement of magnitude and direction of flow within a fluid\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Metagenome.environmental.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-ref_biomaterial,Optional,Primary publication or genome report\nbs-rel_to_oxygen,Optional,\"Is this organism an aerobe, anaerobe? Please note that aerobic and anaerobic are valid descriptors for microbial environments, eg, aerobe, anaerobe, facultative, microaerophilic, microanaerobe, obligate aerobe, obligate anaerobe, missing, not applicable, not collected, not provided, restricted access\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-samp_mat_process,Optional,Processing applied to the sample during or after isolation\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-source_material_id,Optional,\"unique identifier assigned to a material sample used for extracting nucleic acids, and subsequent sequencing. The identifier can refer either to the original material collected or to any derived sub-samples.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Microbe.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-isolation_source,\"At least one field required. Group: At least one required: Group \"\"Source\",\"At least one required: Group \"\"Source\"\". Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sample_type,Required,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-genotype,Optional,observed genotype\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lab_host,Optional,\"Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-mating_type,Optional,\nbs-passage_history,Optional,Number of passages and passage method\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Model.organism.animal.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-breed,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". breed name - chiefly used in domesticated animals or plants\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-age,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-dev_stage,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". Developmental stage at the time of sampling.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-sex,Required,physical sex of sampled organism\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-birth_date,Optional,\nbs-birth_location,Optional,\nbs-breeding_history,Optional,\nbs-breeding_method,Optional,\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_subtype,Optional,\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-death_date,Optional,\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-genotype,Optional,observed genotype\nbs-growth_protocol,Optional,\nbs-health_state,Optional,Health or disease status of sample at time of collection\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-store_cond,Optional,explain how and for how long the soil sample was stored before DNA extraction.\nbs-stud_book_number,Optional,\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.OneHealthEnteric.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-purpose_of_sampling,Required,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-source_type,Required,\"Controlled vocabulary describing the isolation_source. Choose the best fit term: Human, Animal, Food, Environmental, Other, e.g., Food\"\nbs-strain,Required,microbial or eukaryotic strain name\nbs-animal_env,Optional,\"The environment from which the animal sample was taken, e.g., veterinary clinic\"\nbs-animal_intrusion,Optional,\"Identification of animals intruding on the sample or sample site including invertebrates (such as pests or pollinators) and vertebrates (such as wildlife or domesticated animals). This field encourages terms under organism (http://purl.obolibrary.org/obo/NCIT_C14250). This field also encourages identification numbers from NCBI under https://www.ncbi.nlm.nih.gov/taxonomy. Multiple terms can be separated by pipes, e.g., large flies\"\nbs-biocide_used,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; that inhibits the growth, reproduction, and activity of organisms, including fungal cells; decreases the number of fungi or pests present; deters microbial growth and degradation of other ingredients in the formulation. Indicate the biocide used on the location where the sample was taken. Multiple terms can be separated by pipes, e.g., Quaternary ammonium compound|SterBac\"\nbs-building_setting,Optional,location (geography) where a building is set\nbs-coll_site_geo_feat,Optional,\"Text or terms that describe the geographic feature where the food sample was obtained by the researcher. This field encourages selected terms listed under the following ontologies: anthropogenic geographic feature (http://purl.obolibrary.org/obo/ENVO_00000002), for example agricultural fairground [ENVO:01000986]; garden [ENVO:00000011} or any of its subclasses; market [ENVO:01000987]; water well [ENVO:01000002]; or human construction (http://purl.obolibrary.org/obo/ENVO_00000070), e.g., grocery store [GENEPIO:0001020]\"\nbs-cult_isol_date,Optional,\"A culture isolation date is a date-time entity marking the end of a process in which a sample yields a positive result for the target microbial analyte(s) in the form of an isolated colony or colonies, e.g., 5/24/2020\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-env_local_scale,Optional,\"Add terms that identify environmental entities having causal influences upon the entity at time of sampling, multiple terms can be separated by pipes, e.g.: shoreline [ENVO:00000486]|intertidal zone [ENVO:00000316]\"\nbs-env_medium,Optional,Add terms that identify the material displaced by the entity at time of sampling. Recommend subclasses of environmental material [ENVO:00010483]. Multiple terms can be separated by pipes e.g.: estuarine water [ENVO:01000301]|estuarine mud [ENVO:00002160]\nbs-env_monitoring_zone,Optional,\"An environmental monitoring zone is a formal designation as part of an environmental monitoring program, in which areas of a food production facility are categorized, commonly as zones 1-4, based on likelihood or risk of foodborne pathogen contamination. This field accepts entries of zones 1-4, e.g., Zone 1\"\nbs-extr_weather_event,Optional,\"Unusual weather events that may have affected microbial populations. Multiple terms can be separated by pipes, listed in reverse chronological order, e.g., hail\"\nbs-facility_type,Optional,\"Establishment details about the type of facility where the sample was taken. This is independent of the specific product(s) within the facility, e.g., manufacturing-processing\"\nbs-farm_equip,Optional,\"List of relevant equipment used for planting, fertilization, harvesting, irrigation, land levelling, residue management, weeding or transplanting during the growing season. This field encourages terms listed under agricultural implement (http://purl.obolibrary.org/obo/AGRO_00000416). Multiple terms can be separated by pipes, e.g., combine harvester [AGRO:00000473]\"\nbs-farm_water_source,Optional,\"Source of water used on the farm for irrigation of crops or watering of livestock, e.g., water well\"\nbs-fertilizer_admin,Optional,\"Type of fertilizer or amendment added to the soil or water for the purpose of improving substrate health and quality for plant growth. This field encourages terms listed under agronomic fertilizer (http://purl.obolibrary.org/obo/AGRO_00002062). Multiple terms may apply and can be separated by pipes, listing in reverse chronological order, e.g., fish emulsion [AGRO:00000082]\"\nbs-food_additive,Optional,\"A substance or substances added to food to maintain or improve safety and freshness, to improve or maintain nutritional value, or improve taste, texture and appearance. This field encourages terms listed under food additive (http://purl.obolibrary.org/obo/FOODON_03412972). Multiple terms can be separated by one or more pipes, but please consider limiting this list to the top 5 ingredients listed in order as on the food label. See also, https://www.fda.gov/food/food-ingredients-packaging/overview-food-ingredients-additives-colors, e.g., xanthan gum [FOODON:03413321]\"\nbs-food_clean_proc,Optional,\"The process of cleaning food to separate other environmental materials from the food source. Multiple terms can be separated by pipes, e.g., rinsed with water|scrubbed with brush\"\nbs-food_contact_surf,Optional,\"The specific container or coating materials in direct contact with the food. Multiple values can be assigned. This field encourages terms listed under food contact surface (http://purl.obolibrary.org/obo/FOODON_03500010), e.g., aluminum surface [FOODON:03500042]\"\nbs-food_contain_wrap,Optional,\"Type of container or wrapping defined by the main container material, the container form, and the material of the liner lids or ends. Also type of container or wrapping by form; prefer description by material first, then by form. This field encourages terms listed under food container or wrapping (http://purl.obolibrary.org/obo/FOODON_03490100), e.g., bottle or jar [FOODON:03490203]\"\nbs-food_industry_class,Optional,\"The US FDA Class is the second of five elements that comprise a FDA product code. This element is directly related to an Industry and designates the food group, source, product, use, pharmacological action, category or animal species of the product. A Class code is more specific than an Industry; for example, the Fishery/Seafood products Industry may contain Classes such as Smoked, Breaded and such, e.g., Coffee, Decaffeinated\"\nbs-food_industry_code,Optional,\"The US FDA Industry Code is the first of five elements that comprise an FDA product code. An Industry code determines the broadest area into which a product falls, e.g., 31 Coffee and Tea\"\nbs-food_origin,Optional,\"A reference to a place on the Earth, by its name or by its geographical location that describes the origin of the food commodity, either in terms of its cultivation or production. This field encourages terms listed under geographic location (http://purl.obolibrary.org/obo/GAZ_00000448), e.g., Thailand\"\nbs-food_pack_integrity,Optional,\"A term label and term id to describe the state of the packing material and text to explain the exact condition. This field encourages terms listed under food packing medium integrity (http://purl.obolibrary.org/obo/FOODON_03530218), e.g., food packing medium compromised [FOODON:00002517]\"\nbs-food_pack_medium,Optional,\"The medium in which the food is packed for preservation and handling or the medium surrounding homemade foods, e.g., peaches cooked in sugar syrup. The packing medium may provide a controlled environment for the food. It may also serve to improve palatability and consumer appeal. This includes edible packing media (e.g. fruit juice), gas other than air (e.g. carbon dioxide), vacuum packed, or packed with aerosol propellant. This field encourages terms under food packing medium (http://purl.obolibrary.org/obo/FOODON_03480020). Multiple terms may apply and can be separated by pipes, e.g., vacuum-packed [FOODON:03480027]\"\nbs-food_preserv_proc,Optional,\"The methods contributing to the prevention or retardation of microbial, enzymatic or oxidative spoilage and thus to the extension of shelf life. This field encourages terms listed under food preservation process (http://purl.obolibrary.org/obo/FOODON_03470107), e.g., food fermentation [FOODON:00001304]\"\nbs-food_processing_method,Optional,\"Methods for processing food, e.g., food (blanched) [FOODON:00002767]\"\nbs-food_prod,Optional,\"Descriptors of the food production system or of the agricultural environment and growing conditions related to the farm production system. This field encourages terms listed under food production (http://purl.obolibrary.org/obo/FOODON_03530206). Multiple terms may apply and can be separated by pipes, e.g., restaurant food preparation process [FOODON:03530110]\"\nbs-food_prod_synonym,Optional,\"Other names by which the food product is known by (e.g., regional or non-English names), e.g., pinot gris\"\nbs-food_product_type,Optional,\"A food product type is a class of food products that is differentiated by its food composition (e.g., single- or multi-ingredient), processing and/or consumption characteristics. This does not include brand name products but it may include generic food dish categories. This field encourages terms under food product type (http://purl.obolibrary.org/obo/FOODON:03400361). For terms related to food product for an animal, consult food product for animal (http://purl.obolibrary.org/obo/FOODON_03309997). If the proper descriptor is not listed please use text to describe the food type. Multiple terms can be separated by one or more pipes, e.g., multi-component food product [FOODON:00002501]\"\nbs-food_quality_date,Optional,\"The date recommended for the use of the product while at peak quality, this date is not a reflection of safety unless used on infant formula this date is not a reflection of safety and is typically labeled on a food product as \"\"\"\"best if used by,\"\"\"\" best by,\"\"\"\" \"\"\"\"use by,\"\"\"\" or \"\"\"\"freeze by\"\"\"\", e.g., 5/24/2020\"\nbs-food_source,Optional,\"Individual organism or category of organisms from which the food product or its major ingredient is derived, e.g., giant tiger prawn [FOODON:03412612]\"\nbs-food_type_processed,Optional,\"Food type processed in facility, e.g., dairy\"\nbs-host,Optional,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_am,Optional,\"The class(es) or name(s) (generic or brand) of the antimicrobial(s) given to the food animal within the last 30 days, e.g., tetracycline [CHEBI:27902]\"\nbs-host_animal_breed,Optional,\"The animal breed of the host organism. Used mainly for animal hosts, e.g., duroc, angus, mixed breed\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_disease,Optional,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-host_group_size,Optional,\"The number of food animals of the same species that are maintained together as a unit, i.e. a herd or flock, e.g., 80\"\nbs-host_housing,Optional,\"Description of the housing system of the livestock. This field encourages terms listed under terrestrial management housing system (http://opendata.inra.fr/EOL/EOL_0001605), e.g., pen [EOL:0001902]\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-host_variety,Optional,\"The variety or cultivar of the host organism; the name given to a particular variety of organism to distinguish it from otherwise similar organisms of the same species, e.g., romaine lettuce; Athena melons; Patio Snacker cucumbers\"\nbs-ifsac_category,Optional,\"The IFSAC food categorization scheme has five distinct levels to which foods can be assigned, depending upon the type of food. First, foods are assigned to one of four food groups (aquatic animals, land animals, plants, and other). Food groups include increasingly specific food categories; dairy, eggs, meat and poultry, and game are in the land animal food group, and the category meat and poultry is further subdivided into more specific categories of meat (beef, pork, other meat) and poultry (chicken, turkey, other poultry). Finally, foods are differentiated by differences in food processing (such as pasteurized fluid dairy products, unpasteurized fluid dairy products, pasteurized solid and semi-solid dairy products, and unpasteurized solid and semi-solid dairy products. An IFSAC food category chart is available from https://www.cdc.gov/foodsafety/ifsac/projects/food-categorization-scheme.html PMID: 28926300, e.g., Plants:Produce:Vegetables:Herbs:Dried Herbs\"\nbs-indoor_surf,Optional,type of indoor surface\nbs-indoor_surf_subpart,Optional,\"The subpart of the object(s) that was swabbed, like a cart, drain, counter, etc., e.g., wheel\"\nbs-intended_consumer,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed, e.g., human\"\nbs-isolate_name_alias,Optional,Other IDs associated with this isolate or strain. Separate with '; ' if more than one\nbs-label_claims,Optional,\"Descriptors of the food production system such as wild caught, free-range, organic, free-range, industrial, hormone-free, antibiotic free, cage free, e.g., wild caught\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-location_in_facility,Optional,\"Name of the location or room in the facility where the sampling occurred, e.g., ripening room\"\nbs-material_condition,Optional,\"Condition of material sampled, e.g., rusted\"\nbs-mechanical_damage,Optional,information about any mechanical damage exerted on the plant; can include multiple damages and sites\nbs-plant_growth_med,Optional,\"Type of the media used for growing sampled plants, e.g., soil [ENVO:00001998]\"\nbs-plant_water_method,Optional,\"Description of the equipment or method used to distribute water to crops. This field encourages terms listed under irrigation process (http://purl.obolibrary.org/obo/AGRO_00000006). Multiple terms can be separated by pipes, e.g., drip irrigation process [AGRO:00000056]\"\nbs-project_name,Optional,\"A concise name that describes the overall project, for example \"\"Analysis of sequences collected from Antarctic soil\"\"\"\nbs-reference_material,Optional,\"Indicates that a standards body or external group asserts this sample is reference material, eg, 'NIST reference material for genome sequencing validation'.\"\nbs-rel_location,Optional,\"Location of sample to other parts of the farm, e.g. under crop plant, near irrigation ditch, from the dirt road, from air above crops, nearby river, e.g., furrow\"\nbs-samp_collect_device,Optional,Method or device employed for collecting sample\nbs-sanitizer_used_postharvest,Optional,\"Substance intended for preventing, neutralizing, destroying, repelling, or mitigating the effects of any pest or microorganism; indicate the sanitizer used during the postharvest cleaning process. Multiple terms can be separated by pipes, e.g., chlorine bleach\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-soil_type,Optional,soil series name or other lower-level classification\nbs-spec_intended_cons,Optional,\"Food consumer type, human or animal, for which the food product is produced and marketed. This field encourages terms listed under food consumer group (http://purl.obolibrary.org/obo/FOODON_03510136), e.g., infant or toddler as food consumer [FOODON:03510020]\"\nbs-surf_material,Optional,surface materials at the point of sampling\nbs-surf_temp,Optional,temperature of the surface at the time of sampling\nbs-surface_orientation,Optional,\"Describe which surface of the object is swabbed. (e.g underside, top, corner), e.g., underside\"\nbs-upstream_intervention,Optional,\"List any known health-related interventions (prophylactic, therapeutic, and/or metaphylactic) administered to the host, i.e. vaccinations, hormonal patches, antibiotics, injections in feed, etc., e.g., prophylactic/metaphylactic antibiotics\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Pathogen.cl.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Required,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-genotype,Optional,observed genotype\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_description,Optional,Additional information not included in other defined vocabulary fields\nbs-host_disease_outcome,Optional,\"Final outcome of disease, e.g., death, chronic disease, recovery\"\nbs-host_disease_stage,Optional,Stage of disease at the time of sampling\nbs-host_health_state,Optional,Information regarding health state of the individual sampled at the time of sampling\nbs-host_sex,Optional,Biological sex of the host\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-passage_history,Optional,Number of passages and passage method\nbs-pathotype,Optional,\"Some bacterial specific pathotypes (example Eschericia coli - STEC, UPEC)\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-subgroup,Optional,Taxonomy below subspecies; sometimes used in viruses to denote subgroups taken from a single isolate.\nbs-subtype,Optional,\"Used as classifier in viruses (e.g. HIV type 1, Group M, Subtype A).\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Pathogen.env.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-strain,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". microbial or eukaryotic strain name\"\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Required,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-genotype,Optional,observed genotype\nbs-passage_history,Optional,Number of passages and passage method\nbs-pathotype,Optional,\"Some bacterial specific pathotypes (example Eschericia coli - STEC, UPEC)\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-serovar,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serotype. Sometimes used as species identifier in bacteria with shaky taxonomy, e.g. Leptospira, serovar saopaolo S76607 (65357 in Entrez).\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-subgroup,Optional,Taxonomy below subspecies; sometimes used in viruses to denote subgroups taken from a single isolate.\nbs-subtype,Optional,\"Used as classifier in viruses (e.g. HIV type 1, Group M, Subtype A).\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Plant.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". identification or description of the specific individual from which this sample was obtained\"\nbs-cultivar,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". cultivar name - cultivated variety of plant\"\nbs-ecotype,\"At least one field required. Group: At least one required: Group \"\"Organism\",\"At least one required: Group \"\"Organism\"\". a population within a given species displaying genetically based, phenotypic traits that reflect adaptation to a local habitat, e.g., Columbia\"\nbs-age,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". age at the time of sampling; relevant scale depends on species and study, e.g. could be seconds for amoebae or centuries for trees\"\nbs-dev_stage,\"At least one field required. Group: At least one required: Group \"\"Age/stage\",\"At least one required: Group \"\"Age/stage\"\". Developmental stage at the time of sampling.\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-tissue,Required,Type of tissue the sample was taken from.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-cell_line,Optional,Name of the cell line.\nbs-cell_type,Optional,Type of cell of the sample or from which the sample was obtained.\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-disease_stage,Optional,stage of disease at the time of sampling.\nbs-genotype,Optional,observed genotype\nbs-growth_protocol,Optional,\nbs-height_or_length,Optional,measurement of height or length\nbs-isolation_source,Optional,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-phenotype,Optional,\"Phenotype of sampled organism. For Phenotypic quality Ontology (PATO) (v1.269) terms, please see http://bioportal.bioontology.org/visualize/44601\"\nbs-population,Optional,\"for human: ; for plants: filial generation, number of progeny, genetic structure\"\nbs-sample_type,Optional,\"Sample type, such as cell culture, mixed culture, tissue sample, whole organism, single cell, metagenomic assembly\"\nbs-sex,Optional,physical sex of sampled organism\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-treatment,Optional,\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.SARS-CoV-2.cl.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-collected_by,Required,Name of persons or institute who collected the sample\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-host,Required,\"The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-host_disease,Required,\"Name of relevant disease, e.g. Salmonella gastroenteritis. Controlled vocabulary, http://bioportal.bioontology.org/ontologies/1009 or http://www.ncbi.nlm.nih.gov/mesh\"\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-antiviral_treatment_agent,Optional,What was the antiviral treatment agent?\nbs-collection_device,Optional,\"Instrument or container used to collect sample, e.g., swab\"\nbs-collection_method,Optional,\"Process used to collect the sample, e.g., bronchoalveolar lavage (BAL)\"\nbs-date_of_prior_antiviral_treat,Optional,\"Date of the SARS-CoV-2 antiviral treatment, e.g., 2021-03-30\"\nbs-date_of_prior_sars_cov_2_infection,Optional,\"Date of the prior SARS-CoV-2 infection, e.g., 2021-03-30\"\nbs-date_of_sars_cov_2_vaccination,Optional,\"Date of the 1st dose of the SARS-CoV-2 vaccine, e.g., 2021-03-30\"\nbs-exposure_event,Optional,\"Event leading to exposure, e.g., mass gathering\"\nbs-geo_loc_exposure,Optional,\"The country where the host was likely exposed to the causative agent of the illness. This location pertains to the country the host was believed to be exposed, and may not be the same as the host's country of residence, e.g., Canada\"\nbs-gisaid_accession,Optional,\"The GISAID accession assigned to the sequence. GISAID Accession Numbers are used as unique and permanent identifiers for each virus beginning with the letters EPI and followed by numbers, to identify viruses and/or segments; https://www.gisaid.org/; e.g., EPI_ISL_1091361\"\nbs-gisaid_virus_name,Optional,\"The full virus name submitted to GISAID (https://www.gisaid.org/), e.g., hCoV-19/Belgium/rega-3187/2021\"\nbs-host_age,Optional,Age of host at the time of sampling\nbs-host_anatomical_material,Optional,\"Host anatomical material or substance produced by the body where the sample was obtained, e.g., stool, mucus, saliva\"\nbs-host_anatomical_part,Optional,\"Anatomical part of the host organism (e.g. tissue) that was sampled, e.g., nasopharynx\"\nbs-host_body_product,Optional,\"substance produced by the host, e.g. stool, mucus, where the sample was obtained from\"\nbs-host_disease_outcome,Optional,\"Final outcome of disease, e.g., death, chronic disease, recovery\"\nbs-host_health_state,Optional,Information regarding health state of the individual sampled at the time of sampling\nbs-host_recent_travel_loc,Optional,\"The name of the country that was the destination of most recent travel. Specify the countries (and more granular locations if known) travelled, e.g., United Kingdom. Can include multiple travels; separate multiple travel events with a semicolon.\"\nbs-host_recent_travel_return_date,Optional,\"The date of a person's most recent return to some residence from a journey originating at that residence, e.g., 2021-03-30\"\nbs-host_sex,Optional,Biological sex of the host\nbs-host_specimen_voucher,Optional,\"Identifier for the physical specimen. Include a URI (Uniform Resource Identifier) in the form of a URL providing a direct link to the physical host specimen. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical host voucher specimen. If a URI is not available, a museum-provided globally unique identifier (GUID) can be used. URI example: http://portal.vertnet.org/o/fmnh/mammals?id=33e55cfe-330b-40d9-aaae-8d042cba7542; INSDC triplet example: UAM:Mamm:52179\"\nbs-host_subject_id,Optional,\"a unique identifier by which each subject can be referred to, de-identified, e.g. #131\"\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-passage_method,Optional,\"Description of how the organism was passaged. Provide a short description, e.g., AVL buffer+30%EtOH lysate received from Respiratory Lab. P3 passage in Vero-1 via bioreactor large-scale batch passage. P3 batch derived from the SP-2/reference lab strain. If not passaged, put \"\"\"\"not applicable\"\"\"\".\"\nbs-passage_number,Optional,\"The number of known passages, e.g., 3. If not passaged, put \"\"\"\"not applicable\"\"\"\".\"\nbs-prior_sars_cov_2_antiviral_treat,Optional,Has the host received SARS-CoV-2 antiviral treatment?\nbs-prior_sars_cov_2_infection,Optional,Did the host have a prior SARS-CoV-2 infection?\nbs-prior_sars_cov_2_vaccination,Optional,Has the host received a SARS-CoV-2 vaccination?\nbs-purpose_of_sampling,Optional,\"the reason that the sample was collected, e.g., active surveillance in response to an outbreak, active surveillance not initiated by an outbreak, clinical trial, cluster investigation, environmental assessment, farm sample, field trial, for cause, industry internal investigation, market sample, passive surveillance, population based studies, research, research and development\"\nbs-purpose_of_sequencing,Optional,\"The reason the sample was sequenced, e.g., baseline surveillance (random sampling)\"\nbs-sars_cov_2_diag_gene_name_1,Optional,The name of the gene used in the first diagnostic SARS-CoV-2 RT-PCR test.\nbs-sars_cov_2_diag_gene_name_2,Optional,The name of the gene used in the second diagnostic SARS-CoV-2 RT-PCR test.\nbs-sars_cov_2_diag_pcr_ct_value_1,Optional,\"The cycle threshold (CT) value result from the first diagnostic SARS-CoV-2 RT-PCR test, e.g., 21\"\nbs-sars_cov_2_diag_pcr_ct_value_2,Optional,\"The cycle threshold (CT) value result from the second diagnostic SARS-CoV-2 RT-PCR test, e.g., 36\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-vaccine_received,Optional,\"Which vaccine did the host receive, e.g., Pfizer-BioNTech COVID-19 vaccine\"\nbs-virus_isolate_of_prior_infection,Optional,\"Specific isolate of SARS-CoV-2 in prior infection (if known), e.g., SARS-CoV-2/human/USA/CA-CDPH-001/2020\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.SARS-CoV-2.wwsurv.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-ww_population,Required,\"Number of persons contributing wastewater to this sample collection site; if unknown, estimate to the nearest order of magnitude, e.g., 10000. If no estimate is available, input NA.\"\nbs-ww_sample_duration,Required,\"Duration of composite sample collected, in units of hours, e.g., 24. Specify integer values. If the sample is not a composite sample, use 0.\"\nbs-ww_sample_matrix,Required,The wastewater matrix that was sampled\nbs-ww_sample_type,Required,Type of wastewater sample collected\nbs-ww_surv_target_1,Required,\"Taxonomic name of the surveillance target. For the COVID-19 response, use 'SARS-CoV-2'.\"\nbs-ww_surv_target_1_known_present,Required,\"Is genetic material of the surveillance target(s) known to the submitter to be present in this wastewater sample? Presence defined as microbiological evidence of the target organism in the wastewater sample, such as genetic- or culture-based detection.\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-purpose_of_ww_sampling,Optional,The reason the sample was collected\nbs-purpose_of_ww_sequencing,Optional,\"The reason the sample was sequenced, e.g., identification of mutations within a specific region, presence of clinically known mutations, or diversity of mutations across entire genome\"\nbs-sequenced_by,Optional,\"The name of the agency that generated the sequence, e.g., Centers for Disease Control and Prevention\"\nbs-ww_endog_control_1,Optional,\"The name of an organism, gene, or compound used as an endogenous wastewater control, e.g., pepper mild mottle virus\"\nbs-ww_endog_control_1_conc,Optional,\"The concentration of the endogenous control specified in 'ww_endog_control_1' on a per wastewater unit basis, e.g., 700000000\"\nbs-ww_endog_control_1_protocol,Optional,\"The protocol used to quantify 'ww_endog_control_1'. Specify a reference, website, or brief description.\"\nbs-ww_endog_control_1_units,Optional,\"The units of the value specified in 'ww_endog_control_1_conc', e.g., copies/L wastewater\"\nbs-ww_endog_control_2,Optional,\"The name of an organism, gene, or compound used as an endogenous wastewater control, e.g., crassphage\"\nbs-ww_endog_control_2_conc,Optional,\"The concentration of the endogenous control specified in 'ww_endog_control_2' on a per wastewater unit basis, e.g., 140000000\"\nbs-ww_endog_control_2_protocol,Optional,\"The protocol used to quantify 'ww_endog_control_2'. Specify a reference, website, or brief description.\"\nbs-ww_endog_control_2_units,Optional,\"The units of the value specified in 'ww_endog_control_2_conc', e.g., copies/L wastewater\"\nbs-ww_flow,Optional,\"Daily volumetric flow through collection site, in units of liters per day, e.g., 110000000.\"\nbs-ww_industrial_effluent_percent,Optional,\"Percentage of industrial effluents received by wastewater treatment plant, e.g., 10\"\nbs-ww_ph,Optional,\"pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid, e.g., 7.2\"\nbs-ww_population_source,Optional,\"Source of value specified in 'ww_population', e.g., wastewater utility billing records, population of jurisdiction encompassing the wastewater service area, census blocks clipped to wastewater service area polygon\"\nbs-ww_pre_treatment,Optional,\"Describe any process of pre-treatment that removes materials that can be easily collected from the raw wastewater, e.g., flow equilibration basin promotes settling of some solids\"\nbs-ww_primary_sludge_retention_time,Optional,\"The time primary sludge remains in tank, in hours, e.g., 4.\"\nbs-ww_processing_protocol,Optional,\"The protocol used to process the wastewater sample. Processing includes laboratory procedures prior to and including nucleic acid purification (e.g., pasteurization, concentration, extraction, etc). Specify a reference, website, or brief description.\"\nbs-ww_sample_salinity,Optional,\"Salinity is the total concentration of all dissolved salts in a liquid or solid (in the form of an extract obtained by centrifugation) sample or derived from the conductivity measurement (practical salinity) in milligrams per liter, e.g., 100.\"\nbs-ww_sample_site,Optional,The type of site where the wastewater sample was collected\nbs-ww_surv_jurisdiction,Optional,\"A jurisdiction identifer that can be used to support linking the sample to a public health surveillance system, e.g., va\"\nbs-ww_surv_system_sample_id,Optional,\"The sample ID used for submission to a public health surveillance system (e.g., CDC's National Wastewater Surveillance System), e.g., s123456\"\nbs-ww_surv_target_1_conc,Optional,\"The concentration of the wastewater surveillance target specified in 'ww_surv_target_1' on a per wastewater unit basis, e.g., 200000\"\nbs-ww_surv_target_1_conc_unit,Optional,\"The units of the value specified in 'ww_surv_target_1_conc', e.g., copies/L wastewater\"\nbs-ww_surv_target_1_extract,Optional,\"Measured amount of surveillance target in the nucleic acid extract that was sequenced; on a per extract unit basis, rather than on a per wastewater sample unit basis, e.g., 100000\"\nbs-ww_surv_target_1_extract_unit,Optional,\"The units of the value specified in 'ww_surv_target_1_extract', e.g., copies/microliter extract\"\nbs-ww_surv_target_1_gene,Optional,\"The name of the gene quantified for the the surveillance target specified in 'ww_surv_target_1', e.g., N gene\"\nbs-ww_surv_target_1_protocol,Optional,\"The protocol used to quantify 'ww_surv_target_1'. Specify a reference, website, or brief description.\"\nbs-ww_surv_target_2,Optional,\"Taxonomic name of the surveillance target, eg, Norovirus\"\nbs-ww_surv_target_2_conc,Optional,\"The concentration of the wastewater surveillance target specified in 'ww_surv_target_2' on a per wastewater unit basis, e.g., 24000\"\nbs-ww_surv_target_2_conc_unit,Optional,\"The units of the value specified in 'ww_surv_target_2_conc', e.g., copies/L wastewater\"\nbs-ww_surv_target_2_extract,Optional,\"Measured amount of surveillance target in the nucleic acid extract that was sequenced; on a per extract unit basis, rather than on a per wastewater sample unit basis, e.g., 12000\"\nbs-ww_surv_target_2_extract_unit,Optional,\"The units of the value specified in 'ww_surv_target_2_extract', e.g., copies/microliter extract\"\nbs-ww_surv_target_2_gene,Optional,\"The name of the gene quantified for the the surveillance target specified in 'ww_surv_target_2', e.g., ORF1-ORF2 junction\"\nbs-ww_surv_target_2_known_present,Optional,\"Is genetic material of the surveillance target(s) known to the submitter to be present in this wastewater sample? Presence defined as microbiological evidence of the target organism in the wastewater sample, such as genetic- or culture-based detection.\"\nbs-ww_surv_target_2_protocol,Optional,\"The protocol used to quantify 'ww_surv_target_2'. Specify a reference, website, or brief description.\"\nbs-ww_temperature,Optional,\"Temperature of the wastewater sample at the time of sampling in Celsius, e.g., 25.\"\nbs-ww_total_suspended_solids,Optional,\"Total concentration of solids in raw wastewater influent sample including a wide variety of material, such as silt, decaying plant and animal matter in milligrams per liter, e.g., 500.\"\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.biosample.Virus.1.0_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters.\nbs-sample_title,Required,Descriptive title for sample.\nbs-sample_description,Optional,Optional description for sample.\nbs-isolate,Required,identification or description of the specific individual from which this sample was obtained\nbs-host,\"At least one field required. Group: At least one required: Group \"\"Host\",\"At least one required: Group \"\"Host\"\". The natural (as opposed to laboratory) host to the organism from which the sample was obtained. Use the full taxonomic name, eg, \"\"Homo sapiens\"\".\"\nbs-lab_host,\"At least one field required. Group: At least one required: Group \"\"Host\",\"At least one required: Group \"\"Host\"\". Scientific name and description of the laboratory host used to propagate the source organism or material from which the sample was obtained, e.g., Escherichia coli DH5a, or Homo sapiens HeLa cells\"\nbs-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\"\"\nbs-isolation_source,Required,\"Describes the physical, environmental and/or local geographical source of the biological sample from which the sample was derived.\"\nbs-altitude,Optional,The altitude of the sample is the vertical distance between Earth's surface above Sea Level and the sampled position in the air.\nbs-biomaterial_provider,Optional,\"name and address of the lab or PI, or a culture collection identifier\"\nbs-collected_by,Optional,Name of persons or institute who collected the sample\nbs-culture_collection,Optional,\"Name of source institute and unique culture identifier. See the description for the proper format and list of allowed institutes, http://www.insdc.org/controlled-vocabulary-culturecollection-qualifier\"\nbs-depth,Optional,\"Depth is defined as the vertical distance below surface, e.g. for sediment or soil samples depth is measured from sediment or soil surface, respectivly. Depth can be reported as an interval for subsurface samples.\"\nbs-disease,Optional,\"list of diseases diagnosed; can include multiple diagnoses. the value of the field depends on host; for humans the terms should be chosen from DO (Disease Ontology), free text for non-human. For DO terms, please see http://gemina.svn.sourceforge.net/viewvc/gemina/trunk/Gemina/ontologies/gemina_symptom.obo?view=log\"\nbs-env_broad_scale,Optional,Add terms that identify the major environment type(s) where your sample was collected. Recommend subclasses of biome [ENVO:00000428]. Multiple terms can be separated by one or more pipes e.g.: mangrove biome [ENVO:01000181]|estuarine biome [ENVO:01000020]\nbs-genotype,Optional,observed genotype\nbs-host_tissue_sampled,Optional,\"name of body site where the sample was obtained from, such as a specific organ or tissue, e.g., tongue, lung. For foundational model of anatomy ontology (fma) (v 4.11.0) or Uber-anatomy ontology (UBERON) (v releases/2014-06-15) terms, please see http://purl.bioontology.org/ontology/FMA or http://purl.bioontology.org/ontology/UBERON\"\nbs-identified_by,Optional,name of the taxonomist who identified the specimen\nbs-lat_lon,Optional,\"The geographical coordinates of the location where the sample was collected. Specify as degrees latitude and longitude in format \"\"d[d.dddd] N|S d[dd.dddd] W|E\"\", eg, 38.98 N 77.11 W\"\nbs-passage_history,Optional,Number of passages and passage method\nbs-samp_size,Optional,\"Amount or size of sample (volume, mass or area) that was collected\"\nbs-serotype,Optional,\"Taxonomy below subspecies; a variety (in bacteria, fungi or virus) usually based on its antigenic properties. Same as serovar and serogroup. e.g. serotype=\"\"H1N1\"\" in Influenza A virus CY098518.\"\nbs-specimen_voucher,Optional,\"Identifier for the physical specimen. Use format: \"\"[:[:]]\"\", eg, \"\"UAM:Mamm:52179\"\". Intended as a reference to the physical specimen that remains after it was analyzed. If the specimen was destroyed in the process of analysis, electronic images (e-vouchers) are an adequate substitute for a physical voucher specimen. Ideally the specimens will be deposited in a curated museum, herbarium, or frozen tissue collection, but often they will remain in a personal or laboratory collection for some time before they are deposited in a curated collection. There are three forms of specimen_voucher qualifiers. If the text of the qualifier includes one or more colons it is a 'structured voucher'. Structured vouchers include institution-codes (and optional collection-codes) taken from a controlled vocabulary maintained by the INSDC that denotes the museum or herbarium collection where the specimen resides, please visit: http://www.insdc.org/controlled-vocabulary-specimenvoucher-qualifier.\"\nbs-strain,Optional,microbial or eukaryotic strain name\nbs-temp,Optional,temperature of the sample at time of sampling\nbs-title,Optional,\"Optional internal field for how the BioSample submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-BS\"\" will be used instead.\"\nbs-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.cmt.schema_template.csv", "content": "column_name,required_column,description\n((?:cmt-StructuredComment)(?:Prefix|Suffix)),Required,\"Structured comment keyword. For FLU use \"\"FluData\"\", HIV use \"\"HIV-DataBaseData\"\", and for COV and other organisms use \"\"Assembly-Data\"\".\"\nAssembly Method,Required,\"Structured comment keyword. For FLU use \"\"FluData\"\", HIV use \"\"HIV-DataBaseData\"\", and for COV and other organisms use \"\"Assembly-Data\"\".\"\n", "type": "text"}, {"name": "templates/config.genbank.genbank.flu.src.schema_template.csv", "content": "column_name,required_column,description\nsrc-Altitude,Optional,Altitude in metres above or below sea level of where the sample was collected.\nsrc-Bio_material,Optional,\"An identifier for the biological material from which the nucleotide sequence was obtained, with optional institution code and collection code for the place where it is currently stored. This should be provided using the following format 'institution-code:collection-code:material_id'. material_id is mandatory, institution-code and collection-code are optional; institution-code is mandatory when collection-code is present. This qualifier should be used to annotate the identifiers of material in biological collections which include zoos and aquaria, stock centers, seed banks, germplasm repositories and DNA banks.\"\nsrc-Breed,Optional,The named breed from which sequence was obtained (usually applied to domesticated mammals).\nsrc-Cell_line,Optional,Cell line from which sequence was obtained.\nsrc-Cell_type,Optional,Type of cell from which sequence was obtained.\nsrc-Clone,Optional,Name of clone from which sequence was obtained.\nsrc-Collected_by,Optional,Name of person who collected the sample.\nsrc-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\".\"\nsrc-Cultivar,Optional,Cultivated variety of plant from which sequence was obtained.\nsrc-Culture_collection,Optional,\"Institution code and identifier for the culture from which the nucleotide sequence was obtained, with optional collection code. This should be provided using the following format 'institution-code:collection-code:culture-id'. culture-id and institution-code are mandatory. This qualifier should be used to annotate live microbial and viral cultures, and cell lines that have been deposited in curated culture collections.\"\nsrc-Dev_stage,Optional,Developmental stage of organism.\nsrc-Ecotype,Optional,The named ecotype (population adapted to a local habitat) from which sequence was obtained (customarily applied to populations of Arabidopsis thaliana).\nsrc-Fwd_primer_name,Optional,name of forward PCR primer\nsrc-Fwd_primer_seq,Optional,nucleotide sequence of forward PCR primer\nsrc-Genotype,Optional,Genotype of the organism.\nsrc-Haplogroup,Optional,Name for a group of similar haplotypes that share some sequence variation\nsrc-Haplotype,Optional,Haplotype of the organism.\nsrc-Host,Required,\"When the sequence submission is from an organism that exists in a symbiotic, parasitic, or other special relationship with some second organism, the 'host' modifier can be used to identify the name of the host species.\"\nsrc-Isolate,Required,Identification or description of the specific individual from which this sequence was obtained.\nsrc-Isolation-source,Optional,Describes the local geographical source of the organism from which the sequence was obtained.\nsrc-Lab_host,Optional,Laboratory host used to propagate the organism from which the sequence was obtained.\nsrc-Lat_Lon,Optional,\"Latitude and longitude, in decimal degrees, of where the sample was collected.\"\nsrc-Note,Optional,Any additional information that you wish to provide about the sequence.\nsrc-Rev_primer_name,Optional,name of reverse PCR primer\nsrc-Rev_primer_seq,Optional,nucleotide sequence of reverse PCR primer\nsrc-Segment,Optional,name of viral or phage segment sequenced\nsrc-Serotype,Optional,See Serogroup\nsrc-Serovar,Optional,See Serogroup\nsrc-Sex,Optional,Sex of the organism from which the sequence was obtained.\nsrc-Specimen_voucher,Optional,\"An identifier of the individual or collection of the source organism and the place where it is currently stored, usually an institution. This should be provided using the following format 'institution-code:collection-code:specimen-id'. specimen-id is mandatory, collection-code is optional; institution-code is mandatory when collection-code is provided. Examples: 99-SRNP UAM:Mamm:52179 personal collection:Joe Smith:99-SRNP AMCC:101706\"\nsrc-Strain,Required,Strain of organism from which sequence was obtained.\nsrc-Sub_species,Optional,Subspecies of organism from which sequence was obtained.\nsrc-Tissue_lib,Optional,Tissue library from which the sequence was obtained.\nsrc-Tissue_type,Optional,Type of tissue from which sequence was obtained.\nsrc-Variety,Optional,Variety of organism from which sequence was obtained.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.schema_template.csv", "content": "column_name,required_column,description\nsequence_name,Required,Sequence identifier used in fasta file. This is used to create the fasta file for Genbank by updating the sequence name in your fasta file to reflect the sample name for the specified database.\ngb-sample_name,Required,Identifier name used for GenBank. Max length is 50 characters.\ngb-fasta_definition_line_modifiers,Optional,\"NCBI fasta definition line modifiers can be added here. As many modifiers as you like can be added, but each must bounded by a set of brackets. Some of the available keywords are listed at \"\"https://www.ncbi.nlm.nih.gov/genbank/mods_fastadefline/\"\".\"\ngb-title,Optional,\"Optional internal field for how the GenBank submission should be named when viewed from the NCBI submission portal, . If not provided, when performing submissions <--submission_name> with the suffix \"\"-GB\"\" will be used instead.\"\ngb-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}, {"name": "templates/config.genbank.genbank.src.schema_template.csv", "content": "column_name,required_column,description\nsrc-Altitude,Optional,Altitude in metres above or below sea level of where the sample was collected.\nsrc-Bio_material,Optional,\"An identifier for the biological material from which the nucleotide sequence was obtained, with optional institution code and collection code for the place where it is currently stored. This should be provided using the following format 'institution-code:collection-code:material_id'. material_id is mandatory, institution-code and collection-code are optional; institution-code is mandatory when collection-code is present. This qualifier should be used to annotate the identifiers of material in biological collections which include zoos and aquaria, stock centers, seed banks, germplasm repositories and DNA banks.\"\nsrc-Breed,Optional,The named breed from which sequence was obtained (usually applied to domesticated mammals).\nsrc-Cell_line,Optional,Cell line from which sequence was obtained.\nsrc-Cell_type,Optional,Type of cell from which sequence was obtained.\nsrc-Clone,Optional,Name of clone from which sequence was obtained.\nsrc-Collected_by,Optional,Name of person who collected the sample.\nsrc-geo_loc_name,Required,\"Geographical origin of the sample; use the appropriate name from this list http://www.insdc.org/documents/country-qualifier-vocabulary. Use a colon to separate the country or ocean from more detailed information about the location, eg \"\"Canada: Vancouver\"\" or \"\"Germany: halfway down Zugspitze, Alps\"\".\"\nsrc-Cultivar,Optional,Cultivated variety of plant from which sequence was obtained.\nsrc-Culture_collection,Optional,\"Institution code and identifier for the culture from which the nucleotide sequence was obtained, with optional collection code. This should be provided using the following format 'institution-code:collection-code:culture-id'. culture-id and institution-code are mandatory. This qualifier should be used to annotate live microbial and viral cultures, and cell lines that have been deposited in curated culture collections.\"\nsrc-Dev_stage,Optional,Developmental stage of organism.\nsrc-Ecotype,Optional,The named ecotype (population adapted to a local habitat) from which sequence was obtained (customarily applied to populations of Arabidopsis thaliana).\nsrc-Fwd_primer_name,Optional,name of forward PCR primer\nsrc-Fwd_primer_seq,Optional,nucleotide sequence of forward PCR primer\nsrc-Genotype,Optional,Genotype of the organism.\nsrc-Haplogroup,Optional,Name for a group of similar haplotypes that share some sequence variation\nsrc-Haplotype,Optional,Haplotype of the organism.\nsrc-Host,Required,\"When the sequence submission is from an organism that exists in a symbiotic, parasitic, or other special relationship with some second organism, the 'host' modifier can be used to identify the name of the host species.\"\nsrc-Isolate,Required,Identification or description of the specific individual from which this sequence was obtained.\nsrc-Isolation-source,Optional,Describes the local geographical source of the organism from which the sequence was obtained.\nsrc-Lab_host,Optional,Laboratory host used to propagate the organism from which the sequence was obtained.\nsrc-Lat_Lon,Optional,\"Latitude and longitude, in decimal degrees, of where the sample was collected.\"\nsrc-Note,Optional,Any additional information that you wish to provide about the sequence.\nsrc-Rev_primer_name,Optional,name of reverse PCR primer\nsrc-Rev_primer_seq,Optional,nucleotide sequence of reverse PCR primer\nsrc-Segment,Optional,name of viral or phage segment sequenced\nsrc-Serotype,Optional,See Serogroup\nsrc-Serovar,Optional,See Serogroup\nsrc-Sex,Optional,Sex of the organism from which the sequence was obtained.\nsrc-Specimen_voucher,Optional,\"An identifier of the individual or collection of the source organism and the place where it is currently stored, usually an institution. This should be provided using the following format 'institution-code:collection-code:specimen-id'. specimen-id is mandatory, collection-code is optional; institution-code is mandatory when collection-code is provided. Examples: 99-SRNP UAM:Mamm:52179 personal collection:Joe Smith:99-SRNP AMCC:101706\"\nsrc-Strain,Optional,Strain of organism from which sequence was obtained.\nsrc-Sub_species,Optional,Subspecies of organism from which sequence was obtained.\nsrc-Tissue_lib,Optional,Tissue library from which the sequence was obtained.\nsrc-Tissue_type,Optional,Type of tissue from which sequence was obtained.\nsrc-Variety,Optional,Variety of organism from which sequence was obtained.\n", "type": "text"}, {"name": "templates/config.seqsender.seqsender.schema_template.csv", "content": "column_name,required_column,description\norganism,Required,The most descriptive organism name for the samples.\nauthors,Required,\"Citing authors. List of Last, First Middle, suffix separated by a semicolon \"\";\"\" E.g.: \"\"Baker, Howard Henry, Jr.; Powell, Earl Alexander, III.;\"\"\"\ncollection_date,Required,\"Collection date for sample. Must be in a valid format based on ISO 8601: \"\"YYYY-MM-DD\"\", \"\"YYYY-MM\"\", or \"\"YYYY\"\". Time is not supported.\"\nbioproject,Optional,NCBI BioProject ID.\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.biosample.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\nbs-sample_name,Required,Sample name used for BioSample submission.\nbiosample_status,Required,Current status of the BioSample submission.\nbiosample_accession,Required,Sample accession ID used to identify BioSample submission NCBI.\nbiosample_message,Required,\"If there is a message tied to the sample submitted to BioSample, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.genbank.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\ngb-sample_name,Required,Sample name used for GenBank submission.\ngenbank_status,Required,Current status of the GenBank submission.\ngenbank_accession,Required,Sample accession ID used to identify GenBank submission NCBI.\ngenbank_message,Required,\"If there is a message tied to the sequence submitted to GenBank, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.seqsender.submission.status.report.sra.submission.status.report.schema_template.csv", "content": "column_name,required_column,description\nsra-sample_name,Required,Sample name used for SRA submission.\nsra_status,Required,Current status of the SRA submission.\nsra_accession,Required,Sample accession ID used to identify SRA submission NCBI.\nsra_message,Required,\"If there is a message tied to the sequence submitted to SRA, it will appear here.\"\n", "type": "text"}, {"name": "templates/config.sra.sra.schema_template.csv", "content": "column_name,required_column,description\nsra-sample_name,Required,Identifier name used for SRA. Max length is 50 characters. Name must be unique from BioSample/Genbank submission.\nbs-sample_name,Required,Identifier name used for BioSample. Max length is 50 characters. Required if submitting to SRA.\nsra-file_location,Required,\"Location of raw reads files. Options: \"\"local\"\" or \"\"cloud\"\".\"\nsra-file_1,Required,\"All file names must be unique and not contain any sensitive information. Files can be compressed using gzip or bzip2, and may be submitted in a tar archive but archiving and/or compressing your files is not required. Do not use zip! If files are stored in the cloud, provide the full cloud url. If files are stored locally, if files are stored in the folder \"\"<--submission_dir>/raw_reads/\"\", then just the file name is required; otherwise, provide the full file path for the raw read.\"\nsra-file_#,Optional,\"Repeatable column, replace the \"\"#\"\" with the file number for each file associated with the sample. (i.e. If you had 4 separate raw reads files associated with one sample, then you would have 4 columns named: \"\"sra-file_1\"\", \"\"sra-file_2\"\", \"\"sra-file_3\"\", and \"\"sra-file_4\"\".) All file names must be unique and not contain any sensitive information. Files can be compressed using gzip or bzip2, and may be submitted in a tar archive but archiving and/or compressing your files is not required. Do not use zip! If files are stored in the cloud, provide the full cloud url. If files are stored locally, if files are stored in the folder \"\"<--submission_dir>/raw_reads/\"\", then just the file name is required; otherwise, provide the full file path for the raw read.\"\nsra-library_name,Optional,Short unique identifier for sequencing library.\nsra-loader,Optional,\"SRA loader selection. If NCBI says your SRA files need to be uploaded with a certain loader, you can select it here.\"\nsra-library_strategy,Required,The sequencing technique intended for the library.\nsra-library_source,Required,The type of source material that is being sequenced.\nsra-library_selection,Required,The method used to select and/or enrich the material being sequenced.\nsra-library_layout,Required,\"Whether to expect SINGLE or PAIRED end reads. Options: \"\"single\"\" or \"\"paired\"\".\"\nsra-platform,Optional,Instrument platform.\nsra-instrument_model,Required,Instrument model used for sequencing.\nsra-design_description,Optional,Brief description of materials/methods used for creating sequencing library.\nsra-title,Optional,\"Optional internal field for how the SRA submission should be named when viewed from the NCBI submission portal. If not provided, when performing submissions <--submission_name> with the suffix \"\"-SRA\"\" will be used instead.\"\nsra-comment,Optional,Optional internal field explaining the purpose of the submission for when interacting and resolving submission issues with NCBI.\n", "type": "text"}] diff --git a/mutants/orig_metadata.csv b/mutants/orig_metadata.csv new file mode 100644 index 0000000..172ed0f --- /dev/null +++ b/mutants/orig_metadata.csv @@ -0,0 +1,2 @@ +covv_virus_name +sample1 diff --git a/mutants/src/gisaid_handler.py b/mutants/src/gisaid_handler.py new file mode 100755 index 0000000..d3fc4ec --- /dev/null +++ b/mutants/src/gisaid_handler.py @@ -0,0 +1,64812 @@ +#!/usr/bin/env python3 + +########################### Description ################################## +# Functions for GISAID input/output handling +################################################################################ + +import shutil +import subprocess +from typing import Any, Optional, Match, Any +import os +import pandas as pd +import sys +import time +from Bio import SeqIO +from Bio.Seq import Seq +from Bio.SeqRecord import SeqRecord +import warnings +warnings.filterwarnings("ignore", 'This pattern has match groups') +import re + +import src.upload_log as upload_log +import src.tools as tools +import src.file_handler as file_handler +from src.settings import GISAID_REGEX +from typing import Annotated +from typing import Callable +from typing import ClassVar + +MutantDict = Annotated[dict[str, Callable], "Mutant"] # type: ignore + + +def _mutmut_trampoline(orig, mutants, call_args, call_kwargs, self_arg = None): # type: ignore + """Forward call to original or mutated function, depending on the environment""" + import os # type: ignore + mutant_under_test = os.environ['MUTANT_UNDER_TEST'] # type: ignore + if mutant_under_test == 'fail': # type: ignore + from mutmut.__main__ import MutmutProgrammaticFailException # type: ignore + raise MutmutProgrammaticFailException('Failed programmatically') # type: ignore + elif mutant_under_test == 'stats': # type: ignore + from mutmut.__main__ import record_trampoline_hit # type: ignore + record_trampoline_hit(orig.__module__ + '.' + orig.__name__) # type: ignore + # (for class methods, orig is bound and thus does not need the explicit self argument) + result = orig(*call_args, **call_kwargs) # type: ignore + return result # type: ignore + prefix = orig.__module__ + '.' + orig.__name__ + '__mutmut_' # type: ignore + if not mutant_under_test.startswith(prefix): # type: ignore + result = orig(*call_args, **call_kwargs) # type: ignore + return result # type: ignore + mutant_name = mutant_under_test.rpartition('.')[-1] # type: ignore + if self_arg is not None: # type: ignore + # call to a class method where self is not bound + result = mutants[mutant_name](self_arg, *call_args, **call_kwargs) # type: ignore + else: + result = mutants[mutant_name](*call_args, **call_kwargs) # type: ignore + return result # type: ignore + +# Create directory and files for GISAID submission +def create_gisaid_files(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + args = [organism, database, submission_name, submission_dir, config_dict, metadata]# type: ignore + kwargs = {}# type: ignore + return _mutmut_trampoline(x_create_gisaid_files__mutmut_orig, x_create_gisaid_files__mutmut_mutants, args, kwargs, None) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_orig(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_1(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = None + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_2(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=None).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_3(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = None + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_4(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace(None,"").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_5(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-",None).str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_6(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_7(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-",).str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_8(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("XXgs-XX","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_9(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("GS-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_10(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","XXXX").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_11(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism not in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_12(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["XXCOVXX", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_13(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["cov", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_14(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "XXPOXXX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_15(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "pox", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_16(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "XXARBOXX", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_17(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "arbo", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_18(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "XXRSVXX"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_19(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "rsv"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_20(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism != "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_21(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "XXCOVXX": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_22(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "cov": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_23(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = None + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_24(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "XXcovv_virus_nameXX" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_25(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "COVV_VIRUS_NAME" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_26(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = None + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_27(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "XXcovv_sexXX" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_28(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "COVV_SEX" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_29(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = None + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_30(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "XXcovv_genderXX" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_31(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "COVV_GENDER" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_32(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = None + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_33(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() - "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_34(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.upper() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_35(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "XX_virus_nameXX" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_36(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_VIRUS_NAME" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_37(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = None + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_38(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() - "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_39(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.upper() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_40(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "XX_sexXX" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_41(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_SEX" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_42(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = None + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_43(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() - "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_44(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.upper() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_45(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "XX_genderXX" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_46(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_GENDER" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_47(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = None + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_48(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = None) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_49(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"XXsample_nameXX": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_50(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"SAMPLE_NAME": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_51(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = None + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_52(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["XXsubmitterXX"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_53(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["SUBMITTER"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_54(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["XXUsernameXX"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_55(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_56(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["USERNAME"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_57(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = None + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_58(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["XXfnXX"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_59(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["FN"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_60(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "XXsequence.fsaXX" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_61(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "SEQUENCE.FSA" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_62(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = None + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_63(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["XXsubmitterXX", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_64(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["SUBMITTER", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_65(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "XXfnXX", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_66(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "FN", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_67(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "XXFLUXX" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_68(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "flu" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_69(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" not in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_70(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = None + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_71(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = None) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_72(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"XXauthorsXX": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_73(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"AUTHORS": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_74(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "XXAuthorsXX", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_75(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_76(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "AUTHORS", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_77(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "XXHost_SexXX": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_78(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "host_sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_79(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "HOST_SEX": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_80(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "XXHost_GenderXX"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_81(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "host_gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_82(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "HOST_GENDER"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_83(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = None + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_84(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["XXCollection_DateXX", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_85(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["collection_date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_86(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["COLLECTION_DATE", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_87(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "XXCollection_YearXX", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_88(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "collection_year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_89(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "COLLECTION_YEAR", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_90(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "XXCollection_MonthXX"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_91(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "collection_month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_92(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "COLLECTION_MONTH"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_93(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(None) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_94(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["XXcollection_dateXX"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_95(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["COLLECTION_DATE"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_96(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = None + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_97(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["XXIsolate_IdXX"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_98(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["isolate_id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_99(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["ISOLATE_ID"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_100(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "XXXX" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_101(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = None + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_102(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["XXSegment_IdsXX"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_103(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["segment_ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_104(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["SEGMENT_IDS"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_105(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "XXXX" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_106(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = None + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_107(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["XXsegmentXX"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_108(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["SEGMENT"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_109(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) - ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_110(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" - gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_111(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "XXSeq_Id (XX" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_112(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "seq_id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_113(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "SEQ_ID (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_114(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(None) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_115(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["XXsegmentXX"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_116(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["SEGMENT"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_117(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + "XX)XX" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_118(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = None + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_119(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index=None, columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_120(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns=None, values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_121(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values=None).reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_122(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_123(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_124(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", ).reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_125(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="XXIsolate_NameXX", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_126(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="isolate_name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_127(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="ISOLATE_NAME", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_128(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="XXsegmentXX", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_129(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="SEGMENT", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_130(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="XXsample_nameXX").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_131(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="SAMPLE_NAME").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_132(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = None + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_133(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=None) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_134(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["XXsample_nameXX", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_135(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["SAMPLE_NAME", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_136(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "XXsegmentXX", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_137(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "SEGMENT", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_138(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "XXcollection_dateXX"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_139(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "COLLECTION_DATE"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_140(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = None + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_141(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep=None) + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_142(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="XXfirstXX") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_143(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="FIRST") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_144(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = None + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_145(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(None, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_146(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on=None, how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_147(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how=None, validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_148(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate=None) + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_149(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_150(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_151(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_152(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", ) + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_153(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="XXIsolate_NameXX", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_154(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="isolate_name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_155(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="ISOLATE_NAME", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_156(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="XXinnerXX", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_157(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="INNER", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_158(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="XX1:1XX") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_159(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = None + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_160(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["XXIsolate_IdXX","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_161(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["isolate_id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_162(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["ISOLATE_ID","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_163(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","XXSegment_IdsXX","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_164(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","segment_ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_165(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","SEGMENT_IDS","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_166(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","XXIsolate_NameXX"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_167(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","isolate_name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_168(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","ISOLATE_NAME"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_169(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = None + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_170(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_171(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = None + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_172(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols - last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_173(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=None, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_174(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=None, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_175(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name=None) + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_176(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_177(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_178(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, ) + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_179(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="XXmetadata.csvXX") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_180(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="METADATA.CSV") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_181(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(None, os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_182(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), None) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_183(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_184(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), ) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_185(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(None, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_186(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, None), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_187(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join("metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_188(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, ), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_189(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "XXmetadata.csvXX"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_190(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "METADATA.CSV"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_191(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(None, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_192(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, None)) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_193(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join("orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_194(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, )) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_195(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "XXorig_metadata.csvXX")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_196(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "ORIG_METADATA.CSV")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_197(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database=None, metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_198(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=None, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_199(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=None, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_200(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = None) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_201(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_202(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_203(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_204(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, ) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_205(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="XXGISAIDXX", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_206(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="gisaid", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_207(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(None, os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_208(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), None) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_209(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_210(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), ) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_211(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(None, "sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_212(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, None), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_213(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join("sequence.fsa"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_214(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, ), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_215(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "XXsequence.fsaXX"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_216(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "SEQUENCE.FSA"), os.path.join(submission_dir, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_217(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(None, "orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_218(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, None)) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_219(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join("orig_sequence.fsa")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_220(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, )) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_221(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "XXorig_sequence.fsaXX")) + +# Create directory and files for GISAID submission +def x_create_gisaid_files__mutmut_222(organism: str, database: str, submission_name: str, submission_dir: str, config_dict: dict[str, Any], metadata: pd.DataFrame) -> None: + # Get column names for gisaid submission only + gisaid_df = metadata.filter(regex=GISAID_REGEX).copy() + gisaid_df.columns = gisaid_df.columns.str.replace("gs-","").str.strip() + # Add required GISAID fields + # covCLI returns an error when authors or collection_date are capitalized + if organism in ["COV", "POX", "ARBO", "RSV"]: + if organism == "COV": + sample_name_column = "covv_virus_name" + sex_field_sanitized = "covv_sex" + sex_field_required = "covv_gender" + else: + sample_name_column = organism.lower() + "_virus_name" + sex_field_sanitized = organism.lower() + "_sex" + sex_field_required = organism.lower() + "_gender" + gisaid_df = gisaid_df.rename(columns = {"sample_name": sample_name_column, sex_field_sanitized: sex_field_required}) + gisaid_df["submitter"] = config_dict["Username"] + # fn field is for fasta file name + gisaid_df["fn"] = "sequence.fsa" + first_cols = ["submitter", "fn", sample_name_column] + elif "FLU" in organism: + gisaid_df = gisaid_df.rename(columns = {"authors": "Authors", "Host_Sex": "Host_Gender"}) + # Parse out dates into respective columns + gisaid_df[["Collection_Date", "Collection_Year", "Collection_Month"]] = gisaid_df["collection_date"].apply(process_flu_dates) + gisaid_df["Isolate_Id"] = "" + gisaid_df["Segment_Ids"] = "" + # Pivot FLU segment names from long form to wide form + gisaid_df["segment"] = "Seq_Id (" + gisaid_df["segment"].astype(str) + ")" + group_df = gisaid_df.pivot(index="Isolate_Name", columns="segment", values="sample_name").reset_index() + gisaid_df = gisaid_df.drop(columns=["sample_name", "segment", "collection_date"]) + gisaid_df = gisaid_df.drop_duplicates(keep="first") + gisaid_df = gisaid_df.merge(group_df, on="Isolate_Name", how="inner", validate="1:1") + first_cols = ["Isolate_Id","Segment_Ids","Isolate_Name"] + # Restructure column order + last_cols = [col for col in gisaid_df.columns if col not in first_cols] + gisaid_df = gisaid_df[first_cols + last_cols] + # Create submission files + file_handler.save_csv(df=gisaid_df, file_path=submission_dir, file_name="metadata.csv") + shutil.copy(os.path.join(submission_dir, "metadata.csv"), os.path.join(submission_dir, "orig_metadata.csv")) + file_handler.create_fasta(database="GISAID", metadata=metadata, submission_dir=submission_dir, config_dict = config_dict) + shutil.copy(os.path.join(submission_dir, "sequence.fsa"), os.path.join(submission_dir, "ORIG_SEQUENCE.FSA")) + +x_create_gisaid_files__mutmut_mutants : ClassVar[MutantDict] = { # type: ignore +'x_create_gisaid_files__mutmut_1': x_create_gisaid_files__mutmut_1, + 'x_create_gisaid_files__mutmut_2': x_create_gisaid_files__mutmut_2, + 'x_create_gisaid_files__mutmut_3': x_create_gisaid_files__mutmut_3, + 'x_create_gisaid_files__mutmut_4': x_create_gisaid_files__mutmut_4, + 'x_create_gisaid_files__mutmut_5': x_create_gisaid_files__mutmut_5, + 'x_create_gisaid_files__mutmut_6': x_create_gisaid_files__mutmut_6, + 'x_create_gisaid_files__mutmut_7': x_create_gisaid_files__mutmut_7, + 'x_create_gisaid_files__mutmut_8': x_create_gisaid_files__mutmut_8, + 'x_create_gisaid_files__mutmut_9': x_create_gisaid_files__mutmut_9, + 'x_create_gisaid_files__mutmut_10': x_create_gisaid_files__mutmut_10, + 'x_create_gisaid_files__mutmut_11': x_create_gisaid_files__mutmut_11, + 'x_create_gisaid_files__mutmut_12': x_create_gisaid_files__mutmut_12, + 'x_create_gisaid_files__mutmut_13': x_create_gisaid_files__mutmut_13, + 'x_create_gisaid_files__mutmut_14': x_create_gisaid_files__mutmut_14, + 'x_create_gisaid_files__mutmut_15': x_create_gisaid_files__mutmut_15, + 'x_create_gisaid_files__mutmut_16': x_create_gisaid_files__mutmut_16, + 'x_create_gisaid_files__mutmut_17': x_create_gisaid_files__mutmut_17, + 'x_create_gisaid_files__mutmut_18': x_create_gisaid_files__mutmut_18, + 'x_create_gisaid_files__mutmut_19': x_create_gisaid_files__mutmut_19, + 'x_create_gisaid_files__mutmut_20': x_create_gisaid_files__mutmut_20, + 'x_create_gisaid_files__mutmut_21': x_create_gisaid_files__mutmut_21, + 'x_create_gisaid_files__mutmut_22': x_create_gisaid_files__mutmut_22, + 'x_create_gisaid_files__mutmut_23': x_create_gisaid_files__mutmut_23, + 'x_create_gisaid_files__mutmut_24': x_create_gisaid_files__mutmut_24, + 'x_create_gisaid_files__mutmut_25': x_create_gisaid_files__mutmut_25, + 'x_create_gisaid_files__mutmut_26': x_create_gisaid_files__mutmut_26, + 'x_create_gisaid_files__mutmut_27': x_create_gisaid_files__mutmut_27, + 'x_create_gisaid_files__mutmut_28': x_create_gisaid_files__mutmut_28, + 'x_create_gisaid_files__mutmut_29': x_create_gisaid_files__mutmut_29, + 'x_create_gisaid_files__mutmut_30': x_create_gisaid_files__mutmut_30, + 'x_create_gisaid_files__mutmut_31': x_create_gisaid_files__mutmut_31, + 'x_create_gisaid_files__mutmut_32': x_create_gisaid_files__mutmut_32, + 'x_create_gisaid_files__mutmut_33': x_create_gisaid_files__mutmut_33, + 'x_create_gisaid_files__mutmut_34': x_create_gisaid_files__mutmut_34, + 'x_create_gisaid_files__mutmut_35': x_create_gisaid_files__mutmut_35, + 'x_create_gisaid_files__mutmut_36': x_create_gisaid_files__mutmut_36, + 'x_create_gisaid_files__mutmut_37': x_create_gisaid_files__mutmut_37, + 'x_create_gisaid_files__mutmut_38': x_create_gisaid_files__mutmut_38, + 'x_create_gisaid_files__mutmut_39': x_create_gisaid_files__mutmut_39, + 'x_create_gisaid_files__mutmut_40': x_create_gisaid_files__mutmut_40, + 'x_create_gisaid_files__mutmut_41': x_create_gisaid_files__mutmut_41, + 'x_create_gisaid_files__mutmut_42': x_create_gisaid_files__mutmut_42, + 'x_create_gisaid_files__mutmut_43': x_create_gisaid_files__mutmut_43, + 'x_create_gisaid_files__mutmut_44': x_create_gisaid_files__mutmut_44, + 'x_create_gisaid_files__mutmut_45': x_create_gisaid_files__mutmut_45, + 'x_create_gisaid_files__mutmut_46': x_create_gisaid_files__mutmut_46, + 'x_create_gisaid_files__mutmut_47': x_create_gisaid_files__mutmut_47, + 'x_create_gisaid_files__mutmut_48': x_create_gisaid_files__mutmut_48, + 'x_create_gisaid_files__mutmut_49': x_create_gisaid_files__mutmut_49, + 'x_create_gisaid_files__mutmut_50': x_create_gisaid_files__mutmut_50, + 'x_create_gisaid_files__mutmut_51': x_create_gisaid_files__mutmut_51, + 'x_create_gisaid_files__mutmut_52': x_create_gisaid_files__mutmut_52, + 'x_create_gisaid_files__mutmut_53': x_create_gisaid_files__mutmut_53, + 'x_create_gisaid_files__mutmut_54': x_create_gisaid_files__mutmut_54, + 'x_create_gisaid_files__mutmut_55': x_create_gisaid_files__mutmut_55, + 'x_create_gisaid_files__mutmut_56': x_create_gisaid_files__mutmut_56, + 'x_create_gisaid_files__mutmut_57': x_create_gisaid_files__mutmut_57, + 'x_create_gisaid_files__mutmut_58': x_create_gisaid_files__mutmut_58, + 'x_create_gisaid_files__mutmut_59': x_create_gisaid_files__mutmut_59, + 'x_create_gisaid_files__mutmut_60': x_create_gisaid_files__mutmut_60, + 'x_create_gisaid_files__mutmut_61': x_create_gisaid_files__mutmut_61, + 'x_create_gisaid_files__mutmut_62': x_create_gisaid_files__mutmut_62, + 'x_create_gisaid_files__mutmut_63': x_create_gisaid_files__mutmut_63, + 'x_create_gisaid_files__mutmut_64': x_create_gisaid_files__mutmut_64, + 'x_create_gisaid_files__mutmut_65': x_create_gisaid_files__mutmut_65, + 'x_create_gisaid_files__mutmut_66': x_create_gisaid_files__mutmut_66, + 'x_create_gisaid_files__mutmut_67': x_create_gisaid_files__mutmut_67, + 'x_create_gisaid_files__mutmut_68': x_create_gisaid_files__mutmut_68, + 'x_create_gisaid_files__mutmut_69': x_create_gisaid_files__mutmut_69, + 'x_create_gisaid_files__mutmut_70': x_create_gisaid_files__mutmut_70, + 'x_create_gisaid_files__mutmut_71': x_create_gisaid_files__mutmut_71, + 'x_create_gisaid_files__mutmut_72': x_create_gisaid_files__mutmut_72, + 'x_create_gisaid_files__mutmut_73': x_create_gisaid_files__mutmut_73, + 'x_create_gisaid_files__mutmut_74': x_create_gisaid_files__mutmut_74, + 'x_create_gisaid_files__mutmut_75': x_create_gisaid_files__mutmut_75, + 'x_create_gisaid_files__mutmut_76': x_create_gisaid_files__mutmut_76, + 'x_create_gisaid_files__mutmut_77': x_create_gisaid_files__mutmut_77, + 'x_create_gisaid_files__mutmut_78': x_create_gisaid_files__mutmut_78, + 'x_create_gisaid_files__mutmut_79': x_create_gisaid_files__mutmut_79, + 'x_create_gisaid_files__mutmut_80': x_create_gisaid_files__mutmut_80, + 'x_create_gisaid_files__mutmut_81': x_create_gisaid_files__mutmut_81, + 'x_create_gisaid_files__mutmut_82': x_create_gisaid_files__mutmut_82, + 'x_create_gisaid_files__mutmut_83': x_create_gisaid_files__mutmut_83, + 'x_create_gisaid_files__mutmut_84': x_create_gisaid_files__mutmut_84, + 'x_create_gisaid_files__mutmut_85': x_create_gisaid_files__mutmut_85, + 'x_create_gisaid_files__mutmut_86': x_create_gisaid_files__mutmut_86, + 'x_create_gisaid_files__mutmut_87': x_create_gisaid_files__mutmut_87, + 'x_create_gisaid_files__mutmut_88': x_create_gisaid_files__mutmut_88, + 'x_create_gisaid_files__mutmut_89': x_create_gisaid_files__mutmut_89, + 'x_create_gisaid_files__mutmut_90': x_create_gisaid_files__mutmut_90, + 'x_create_gisaid_files__mutmut_91': x_create_gisaid_files__mutmut_91, + 'x_create_gisaid_files__mutmut_92': x_create_gisaid_files__mutmut_92, + 'x_create_gisaid_files__mutmut_93': x_create_gisaid_files__mutmut_93, + 'x_create_gisaid_files__mutmut_94': x_create_gisaid_files__mutmut_94, + 'x_create_gisaid_files__mutmut_95': x_create_gisaid_files__mutmut_95, + 'x_create_gisaid_files__mutmut_96': x_create_gisaid_files__mutmut_96, + 'x_create_gisaid_files__mutmut_97': x_create_gisaid_files__mutmut_97, + 'x_create_gisaid_files__mutmut_98': x_create_gisaid_files__mutmut_98, + 'x_create_gisaid_files__mutmut_99': x_create_gisaid_files__mutmut_99, + 'x_create_gisaid_files__mutmut_100': x_create_gisaid_files__mutmut_100, + 'x_create_gisaid_files__mutmut_101': x_create_gisaid_files__mutmut_101, + 'x_create_gisaid_files__mutmut_102': x_create_gisaid_files__mutmut_102, + 'x_create_gisaid_files__mutmut_103': x_create_gisaid_files__mutmut_103, + 'x_create_gisaid_files__mutmut_104': x_create_gisaid_files__mutmut_104, + 'x_create_gisaid_files__mutmut_105': x_create_gisaid_files__mutmut_105, + 'x_create_gisaid_files__mutmut_106': x_create_gisaid_files__mutmut_106, + 'x_create_gisaid_files__mutmut_107': x_create_gisaid_files__mutmut_107, + 'x_create_gisaid_files__mutmut_108': x_create_gisaid_files__mutmut_108, + 'x_create_gisaid_files__mutmut_109': x_create_gisaid_files__mutmut_109, + 'x_create_gisaid_files__mutmut_110': x_create_gisaid_files__mutmut_110, + 'x_create_gisaid_files__mutmut_111': x_create_gisaid_files__mutmut_111, + 'x_create_gisaid_files__mutmut_112': x_create_gisaid_files__mutmut_112, + 'x_create_gisaid_files__mutmut_113': x_create_gisaid_files__mutmut_113, + 'x_create_gisaid_files__mutmut_114': x_create_gisaid_files__mutmut_114, + 'x_create_gisaid_files__mutmut_115': x_create_gisaid_files__mutmut_115, + 'x_create_gisaid_files__mutmut_116': x_create_gisaid_files__mutmut_116, + 'x_create_gisaid_files__mutmut_117': x_create_gisaid_files__mutmut_117, + 'x_create_gisaid_files__mutmut_118': x_create_gisaid_files__mutmut_118, + 'x_create_gisaid_files__mutmut_119': x_create_gisaid_files__mutmut_119, + 'x_create_gisaid_files__mutmut_120': x_create_gisaid_files__mutmut_120, + 'x_create_gisaid_files__mutmut_121': x_create_gisaid_files__mutmut_121, + 'x_create_gisaid_files__mutmut_122': x_create_gisaid_files__mutmut_122, + 'x_create_gisaid_files__mutmut_123': x_create_gisaid_files__mutmut_123, + 'x_create_gisaid_files__mutmut_124': x_create_gisaid_files__mutmut_124, + 'x_create_gisaid_files__mutmut_125': x_create_gisaid_files__mutmut_125, + 'x_create_gisaid_files__mutmut_126': x_create_gisaid_files__mutmut_126, + 'x_create_gisaid_files__mutmut_127': x_create_gisaid_files__mutmut_127, + 'x_create_gisaid_files__mutmut_128': x_create_gisaid_files__mutmut_128, + 'x_create_gisaid_files__mutmut_129': x_create_gisaid_files__mutmut_129, + 'x_create_gisaid_files__mutmut_130': x_create_gisaid_files__mutmut_130, + 'x_create_gisaid_files__mutmut_131': x_create_gisaid_files__mutmut_131, + 'x_create_gisaid_files__mutmut_132': x_create_gisaid_files__mutmut_132, + 'x_create_gisaid_files__mutmut_133': x_create_gisaid_files__mutmut_133, + 'x_create_gisaid_files__mutmut_134': x_create_gisaid_files__mutmut_134, + 'x_create_gisaid_files__mutmut_135': x_create_gisaid_files__mutmut_135, + 'x_create_gisaid_files__mutmut_136': x_create_gisaid_files__mutmut_136, + 'x_create_gisaid_files__mutmut_137': x_create_gisaid_files__mutmut_137, + 'x_create_gisaid_files__mutmut_138': x_create_gisaid_files__mutmut_138, + 'x_create_gisaid_files__mutmut_139': x_create_gisaid_files__mutmut_139, + 'x_create_gisaid_files__mutmut_140': x_create_gisaid_files__mutmut_140, + 'x_create_gisaid_files__mutmut_141': x_create_gisaid_files__mutmut_141, + 'x_create_gisaid_files__mutmut_142': x_create_gisaid_files__mutmut_142, + 'x_create_gisaid_files__mutmut_143': x_create_gisaid_files__mutmut_143, + 'x_create_gisaid_files__mutmut_144': x_create_gisaid_files__mutmut_144, + 'x_create_gisaid_files__mutmut_145': x_create_gisaid_files__mutmut_145, + 'x_create_gisaid_files__mutmut_146': x_create_gisaid_files__mutmut_146, + 'x_create_gisaid_files__mutmut_147': x_create_gisaid_files__mutmut_147, + 'x_create_gisaid_files__mutmut_148': x_create_gisaid_files__mutmut_148, + 'x_create_gisaid_files__mutmut_149': x_create_gisaid_files__mutmut_149, + 'x_create_gisaid_files__mutmut_150': x_create_gisaid_files__mutmut_150, + 'x_create_gisaid_files__mutmut_151': x_create_gisaid_files__mutmut_151, + 'x_create_gisaid_files__mutmut_152': x_create_gisaid_files__mutmut_152, + 'x_create_gisaid_files__mutmut_153': x_create_gisaid_files__mutmut_153, + 'x_create_gisaid_files__mutmut_154': x_create_gisaid_files__mutmut_154, + 'x_create_gisaid_files__mutmut_155': x_create_gisaid_files__mutmut_155, + 'x_create_gisaid_files__mutmut_156': x_create_gisaid_files__mutmut_156, + 'x_create_gisaid_files__mutmut_157': x_create_gisaid_files__mutmut_157, + 'x_create_gisaid_files__mutmut_158': x_create_gisaid_files__mutmut_158, + 'x_create_gisaid_files__mutmut_159': x_create_gisaid_files__mutmut_159, + 'x_create_gisaid_files__mutmut_160': x_create_gisaid_files__mutmut_160, + 'x_create_gisaid_files__mutmut_161': x_create_gisaid_files__mutmut_161, + 'x_create_gisaid_files__mutmut_162': x_create_gisaid_files__mutmut_162, + 'x_create_gisaid_files__mutmut_163': x_create_gisaid_files__mutmut_163, + 'x_create_gisaid_files__mutmut_164': x_create_gisaid_files__mutmut_164, + 'x_create_gisaid_files__mutmut_165': x_create_gisaid_files__mutmut_165, + 'x_create_gisaid_files__mutmut_166': x_create_gisaid_files__mutmut_166, + 'x_create_gisaid_files__mutmut_167': x_create_gisaid_files__mutmut_167, + 'x_create_gisaid_files__mutmut_168': x_create_gisaid_files__mutmut_168, + 'x_create_gisaid_files__mutmut_169': x_create_gisaid_files__mutmut_169, + 'x_create_gisaid_files__mutmut_170': x_create_gisaid_files__mutmut_170, + 'x_create_gisaid_files__mutmut_171': x_create_gisaid_files__mutmut_171, + 'x_create_gisaid_files__mutmut_172': x_create_gisaid_files__mutmut_172, + 'x_create_gisaid_files__mutmut_173': x_create_gisaid_files__mutmut_173, + 'x_create_gisaid_files__mutmut_174': x_create_gisaid_files__mutmut_174, + 'x_create_gisaid_files__mutmut_175': x_create_gisaid_files__mutmut_175, + 'x_create_gisaid_files__mutmut_176': x_create_gisaid_files__mutmut_176, + 'x_create_gisaid_files__mutmut_177': x_create_gisaid_files__mutmut_177, + 'x_create_gisaid_files__mutmut_178': x_create_gisaid_files__mutmut_178, + 'x_create_gisaid_files__mutmut_179': x_create_gisaid_files__mutmut_179, + 'x_create_gisaid_files__mutmut_180': x_create_gisaid_files__mutmut_180, + 'x_create_gisaid_files__mutmut_181': x_create_gisaid_files__mutmut_181, + 'x_create_gisaid_files__mutmut_182': x_create_gisaid_files__mutmut_182, + 'x_create_gisaid_files__mutmut_183': x_create_gisaid_files__mutmut_183, + 'x_create_gisaid_files__mutmut_184': x_create_gisaid_files__mutmut_184, + 'x_create_gisaid_files__mutmut_185': x_create_gisaid_files__mutmut_185, + 'x_create_gisaid_files__mutmut_186': x_create_gisaid_files__mutmut_186, + 'x_create_gisaid_files__mutmut_187': x_create_gisaid_files__mutmut_187, + 'x_create_gisaid_files__mutmut_188': x_create_gisaid_files__mutmut_188, + 'x_create_gisaid_files__mutmut_189': x_create_gisaid_files__mutmut_189, + 'x_create_gisaid_files__mutmut_190': x_create_gisaid_files__mutmut_190, + 'x_create_gisaid_files__mutmut_191': x_create_gisaid_files__mutmut_191, + 'x_create_gisaid_files__mutmut_192': x_create_gisaid_files__mutmut_192, + 'x_create_gisaid_files__mutmut_193': x_create_gisaid_files__mutmut_193, + 'x_create_gisaid_files__mutmut_194': x_create_gisaid_files__mutmut_194, + 'x_create_gisaid_files__mutmut_195': x_create_gisaid_files__mutmut_195, + 'x_create_gisaid_files__mutmut_196': x_create_gisaid_files__mutmut_196, + 'x_create_gisaid_files__mutmut_197': x_create_gisaid_files__mutmut_197, + 'x_create_gisaid_files__mutmut_198': x_create_gisaid_files__mutmut_198, + 'x_create_gisaid_files__mutmut_199': x_create_gisaid_files__mutmut_199, + 'x_create_gisaid_files__mutmut_200': x_create_gisaid_files__mutmut_200, + 'x_create_gisaid_files__mutmut_201': x_create_gisaid_files__mutmut_201, + 'x_create_gisaid_files__mutmut_202': x_create_gisaid_files__mutmut_202, + 'x_create_gisaid_files__mutmut_203': x_create_gisaid_files__mutmut_203, + 'x_create_gisaid_files__mutmut_204': x_create_gisaid_files__mutmut_204, + 'x_create_gisaid_files__mutmut_205': x_create_gisaid_files__mutmut_205, + 'x_create_gisaid_files__mutmut_206': x_create_gisaid_files__mutmut_206, + 'x_create_gisaid_files__mutmut_207': x_create_gisaid_files__mutmut_207, + 'x_create_gisaid_files__mutmut_208': x_create_gisaid_files__mutmut_208, + 'x_create_gisaid_files__mutmut_209': x_create_gisaid_files__mutmut_209, + 'x_create_gisaid_files__mutmut_210': x_create_gisaid_files__mutmut_210, + 'x_create_gisaid_files__mutmut_211': x_create_gisaid_files__mutmut_211, + 'x_create_gisaid_files__mutmut_212': x_create_gisaid_files__mutmut_212, + 'x_create_gisaid_files__mutmut_213': x_create_gisaid_files__mutmut_213, + 'x_create_gisaid_files__mutmut_214': x_create_gisaid_files__mutmut_214, + 'x_create_gisaid_files__mutmut_215': x_create_gisaid_files__mutmut_215, + 'x_create_gisaid_files__mutmut_216': x_create_gisaid_files__mutmut_216, + 'x_create_gisaid_files__mutmut_217': x_create_gisaid_files__mutmut_217, + 'x_create_gisaid_files__mutmut_218': x_create_gisaid_files__mutmut_218, + 'x_create_gisaid_files__mutmut_219': x_create_gisaid_files__mutmut_219, + 'x_create_gisaid_files__mutmut_220': x_create_gisaid_files__mutmut_220, + 'x_create_gisaid_files__mutmut_221': x_create_gisaid_files__mutmut_221, + 'x_create_gisaid_files__mutmut_222': x_create_gisaid_files__mutmut_222 +} +x_create_gisaid_files__mutmut_orig.__name__ = 'x_create_gisaid_files' + +# Flu collection dates require partial dates to use different columns +def process_flu_dates(row: Any) -> pd.Series: + args = [row]# type: ignore + kwargs = {}# type: ignore + return _mutmut_trampoline(x_process_flu_dates__mutmut_orig, x_process_flu_dates__mutmut_mutants, args, kwargs, None) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_orig(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_1(row: Any) -> pd.Series: + sections = None + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_2(row: Any) -> pd.Series: + sections = row.strip().split(None) + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_3(row: Any) -> pd.Series: + sections = row.strip().split("XX-XX") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_4(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) != 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_5(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 2: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_6(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = None + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_7(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "XXXX" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_8(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = None + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_9(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[1] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_10(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = None + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_11(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "XXXX" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_12(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) != 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_13(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 3: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_14(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = None + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_15(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "XXXX" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_16(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = None + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_17(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[1] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_18(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = None + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_19(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[2] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_20(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) != 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_21(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 4: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_22(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = None + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_23(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = None + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_24(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "XXXX" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_25(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = None + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_26(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "XXXX" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_27(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(None, file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_28(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=None) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_29(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(file=sys.stderr) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_30(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", ) + sys.exit(1) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_31(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(None) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_32(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(2) + return pd.Series([full_date, year, month]) + +# Flu collection dates require partial dates to use different columns +def x_process_flu_dates__mutmut_33(row: Any) -> pd.Series: + sections = row.strip().split("-") + if len(sections) == 1: + full_date = "" + year = sections[0] + month = "" + elif len(sections) == 2: + full_date = "" + year = sections[0] + month = sections[1] + elif len(sections) == 3: + full_date = row.strip() + year = "" + month = "" + else: + print(f"Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: {row.strip()}", file=sys.stderr) + sys.exit(1) + return pd.Series(None) + +x_process_flu_dates__mutmut_mutants : ClassVar[MutantDict] = { # type: ignore +'x_process_flu_dates__mutmut_1': x_process_flu_dates__mutmut_1, + 'x_process_flu_dates__mutmut_2': x_process_flu_dates__mutmut_2, + 'x_process_flu_dates__mutmut_3': x_process_flu_dates__mutmut_3, + 'x_process_flu_dates__mutmut_4': x_process_flu_dates__mutmut_4, + 'x_process_flu_dates__mutmut_5': x_process_flu_dates__mutmut_5, + 'x_process_flu_dates__mutmut_6': x_process_flu_dates__mutmut_6, + 'x_process_flu_dates__mutmut_7': x_process_flu_dates__mutmut_7, + 'x_process_flu_dates__mutmut_8': x_process_flu_dates__mutmut_8, + 'x_process_flu_dates__mutmut_9': x_process_flu_dates__mutmut_9, + 'x_process_flu_dates__mutmut_10': x_process_flu_dates__mutmut_10, + 'x_process_flu_dates__mutmut_11': x_process_flu_dates__mutmut_11, + 'x_process_flu_dates__mutmut_12': x_process_flu_dates__mutmut_12, + 'x_process_flu_dates__mutmut_13': x_process_flu_dates__mutmut_13, + 'x_process_flu_dates__mutmut_14': x_process_flu_dates__mutmut_14, + 'x_process_flu_dates__mutmut_15': x_process_flu_dates__mutmut_15, + 'x_process_flu_dates__mutmut_16': x_process_flu_dates__mutmut_16, + 'x_process_flu_dates__mutmut_17': x_process_flu_dates__mutmut_17, + 'x_process_flu_dates__mutmut_18': x_process_flu_dates__mutmut_18, + 'x_process_flu_dates__mutmut_19': x_process_flu_dates__mutmut_19, + 'x_process_flu_dates__mutmut_20': x_process_flu_dates__mutmut_20, + 'x_process_flu_dates__mutmut_21': x_process_flu_dates__mutmut_21, + 'x_process_flu_dates__mutmut_22': x_process_flu_dates__mutmut_22, + 'x_process_flu_dates__mutmut_23': x_process_flu_dates__mutmut_23, + 'x_process_flu_dates__mutmut_24': x_process_flu_dates__mutmut_24, + 'x_process_flu_dates__mutmut_25': x_process_flu_dates__mutmut_25, + 'x_process_flu_dates__mutmut_26': x_process_flu_dates__mutmut_26, + 'x_process_flu_dates__mutmut_27': x_process_flu_dates__mutmut_27, + 'x_process_flu_dates__mutmut_28': x_process_flu_dates__mutmut_28, + 'x_process_flu_dates__mutmut_29': x_process_flu_dates__mutmut_29, + 'x_process_flu_dates__mutmut_30': x_process_flu_dates__mutmut_30, + 'x_process_flu_dates__mutmut_31': x_process_flu_dates__mutmut_31, + 'x_process_flu_dates__mutmut_32': x_process_flu_dates__mutmut_32, + 'x_process_flu_dates__mutmut_33': x_process_flu_dates__mutmut_33 +} +x_process_flu_dates__mutmut_orig.__name__ = 'x_process_flu_dates' + + +# Read output log from gisaid submission script +def process_gisaid_log(log_file: str, submission_dir: str) -> pd.DataFrame: + args = [log_file, submission_dir]# type: ignore + kwargs = {}# type: ignore + return _mutmut_trampoline(x_process_gisaid_log__mutmut_orig, x_process_gisaid_log__mutmut_mutants, args, kwargs, None) + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_orig(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_1(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type=None, file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_2(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=None) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_3(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_4(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", ) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_5(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="XXGISAID logXX", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_6(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="gisaid log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_7(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID LOG", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_8(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = None + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_9(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = None + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_10(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(None, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_11(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, None) as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_12(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open("r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_13(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, ) as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_14(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "XXrXX") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_15(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "R") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_16(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = None + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_17(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(None, line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_18(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", None): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_19(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_20(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", ): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_21(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"XX(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)XX", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_22(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(epi_isl|epi_id)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(epi_isl_|epi)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_23(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?I)(\W|^)(\"MSG\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(EPI_ID|EPI_ISL_ID):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_24(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = None + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_25(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(None, line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_26(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', None) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_27(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_28(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', ) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_29(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'XX(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)XX', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_30(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-za-z0-9_-]+(?:/[a-za-z0-9_-]+)+|epi_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_31(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[A-ZA-Z0-9_-]+(?:/[A-ZA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_32(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = None + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_33(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(None) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_34(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = 'XX XX'.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_35(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = None + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_36(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(None) + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_37(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split('XX XX') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_38(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = None + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_39(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[1].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_40(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = None + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_41(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[2].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_42(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(None, accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_43(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", None): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_44(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_45(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", ): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_46(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"XXEPI_ISL_\d+XX", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_47(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"epi_isl_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_48(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append(None) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_49(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"XXgs-sample_nameXX":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_50(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"GS-SAMPLE_NAME":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_51(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "XXgisaid_accession_epi_isl_idXX":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_52(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "GISAID_ACCESSION_EPI_ISL_ID":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_53(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(None, accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_54(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", None): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_55(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_56(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", ): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_57(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"XXEPI\d+XX", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_58(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"epi\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_59(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append(None) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_60(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"XXgs-segment_nameXX":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_61(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"GS-SEGMENT_NAME":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_62(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "XXgisaid_accession_epi_idXX":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_63(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "GISAID_ACCESSION_EPI_ID":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_64(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(None, line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_65(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', None): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_66(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_67(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', ): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_68(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'XX"code":\s*"validation_error".*?already exists;\s*existing_virus_name:XX', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_69(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"CODE":\s*"VALIDATION_ERROR".*?ALREADY EXISTS;\s*EXISTING_VIRUS_NAME:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_70(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = None + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_71(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(None, line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_72(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", None) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_73(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_74(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", ) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_75(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"XX(hCoV[^;]+);XX", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_76(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hcov[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_77(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(HCOV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_78(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = None + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_79(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(None) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_80(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(2) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_81(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(None, line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_82(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", None): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_83(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_84(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", ): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_85(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"XX\['(EPI_ISL_\d+)'\]XX", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_86(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(epi_isl_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_87(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = None + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_88(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(None, line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_89(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", None) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_90(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_91(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", ) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_92(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"XX\['(EPI_ISL_\d+)'\]XX", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_93(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(epi_isl_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_94(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = None + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_95(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(None) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_96(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(2) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_97(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = None + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_98(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "XXXX" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_99(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append(None) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_100(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"XXgs-sample_nameXX":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_101(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"GS-SAMPLE_NAME":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_102(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "XXgisaid_accession_epi_isl_idXX":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_103(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "GISAID_ACCESSION_EPI_ISL_ID":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_104(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(None, line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_105(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", None): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_106(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_107(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", ): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_108(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"XX\['(EPI_\d+)'\]XX", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_109(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(epi_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_110(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = None + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_111(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(None, line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_112(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", None) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_113(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_114(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", ) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_115(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"XX\['(EPI_\d+)'\]XX", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_116(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(epi_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_117(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = None + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_118(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(None) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_119(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(2) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_120(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = None + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_121(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "XXXX" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_122(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append(None) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_123(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"XXgs-segment_nameXX":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_124(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"GS-SEGMENT_NAME":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_125(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "XXgisaid_accession_epi_idXX":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_126(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "GISAID_ACCESSION_EPI_ID":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_127(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print(None) + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_128(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("XXFinished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.XX") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_129(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("finished reading gisaid log. if workflow has failed here, it's likely no gisaid ids were returned. check results in gisaid upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_130(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("FINISHED READING GISAID LOG. IF WORKFLOW HAS FAILED HERE, IT'S LIKELY NO GISAID IDS WERE RETURNED. CHECK RESULTS IN GISAID UPLOAD LOG.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_131(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = None + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_132(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = None + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_133(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(None) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_134(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = None + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_135(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(None) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_136(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty or not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_137(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_138(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_139(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print(None) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_140(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("XXGISAID isolates and GISAID segments found.XX") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_141(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("gisaid isolates and gisaid segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_142(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID ISOLATES AND GISAID SEGMENTS FOUND.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_143(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=None, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_144(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database=None, update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_145(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=None) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_146(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_147(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_148(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", ) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_149(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="XXGISAIDXX", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_150(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="gisaid", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_151(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=None, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_152(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database=None, update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_153(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=None) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_154(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_155(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_156(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", ) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_157(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="XXGISAIDXX", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_158(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="gisaid", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_159(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_160(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print(None) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_161(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("XXGISAID isolates found.XX") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_162(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("gisaid isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_163(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID ISOLATES FOUND.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_164(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=None, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_165(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database=None, update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_166(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=None) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_167(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_168(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_169(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", ) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_170(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="XXGISAIDXX", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_171(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="gisaid", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_172(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_173(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print(None) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_174(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("XXGISAID segments found.XX") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_175(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("gisaid segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_176(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID SEGMENTS FOUND.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_177(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=None, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_178(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database=None, update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_179(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=None) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_180(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_181(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_182(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", ) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_183(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="XXGISAIDXX", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_184(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="gisaid", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_185(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print(None) + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_186(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("XXWarning: no GISAID isolates or segments foundXX") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_187(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("warning: no gisaid isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_188(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("WARNING: NO GISAID ISOLATES OR SEGMENTS FOUND") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_189(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = None + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_190(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_191(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(None, regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_192(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = None, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_193(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = None)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_194(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_195(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_196(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, )].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_197(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["XXgisaid_accession_epi_isl_idXX"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_198(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["GISAID_ACCESSION_EPI_ISL_ID"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_199(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"XXEPI_ISL_\d*XX", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_200(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"epi_isl_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_201(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = False, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_202(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = True)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_203(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = None + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_204(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_205(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(None, regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_206(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = None, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_207(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = None)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_208(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_209(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_210(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, )].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_211(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["XXgisaid_accession_epi_isl_idXX"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_212(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["GISAID_ACCESSION_EPI_ISL_ID"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_213(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"XXEPI_ISL_\d*XX", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_214(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"epi_isl_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_215(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = False, na = False)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_216(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = True)].copy() + return gisaid_isolate_df[["gs-sample_name"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_217(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["XXgs-sample_nameXX"]] + + +# Read output log from gisaid submission script +def x_process_gisaid_log__mutmut_218(log_file: str, submission_dir: str) -> pd.DataFrame: + file_handler.validate_file(file_type="GISAID log", file_path=log_file) + # Read in log file + gisaid_isolate_log = [] + gisaid_segment_log = [] + with open(log_file, "r") as file: + line = file.readline().strip() + while line: + # If accession generated record it + # Pattern options: "msg:": "; _" OR : ; _ + if re.search(r"(?i)(\W|^)(\"msg\":\s*\"\S+.*;\s*(EPI_ISL|EPI_ID)_\d*\"|(epi_id|epi_isl_id):\s*\S.*;\s*(EPI_ISL_|EPI)\d+)(\W|$)", line): + gisaid_string_search = re.findall(r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)', line) + gisaid_string = ' '.join(gisaid_string_search) + gisaid_string_list: list[str] = gisaid_string.split(' ') + sample_name = gisaid_string_list[0].strip() + accession_string = gisaid_string_list[1].strip() + if re.match(r"EPI_ISL_\d+", accession_string): + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession_string}) + elif re.match(r"EPI\d+", accession_string): + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession_string}) + # Handling if submitting samples have already been registered in GISAID + elif re.search(r'"code":\s*"validation_error".*?already exists;\s*existing_virus_name:', line): + sample_name_search = re.search(r"(hCoV[^;]+);", line) + if sample_name_search: + sample_name = sample_name_search.group(1) + if re.search(r"\['(EPI_ISL_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_ISL_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_isolate_log.append({"gs-sample_name":sample_name, "gisaid_accession_epi_isl_id":accession}) + elif re.search(r"\['(EPI_\d+)'\]", line): + accession_search = re.search(r"\['(EPI_\d+)'\]", line) + if accession_search: + accession = accession_search.group(1) + else: + accession = "" + gisaid_segment_log.append({"gs-segment_name":sample_name, "gisaid_accession_epi_id":accession}) + else: + print("Finished reading GISAID log. If workflow has failed here, it's likely no GISAID IDs were returned. Check results in GISAID upload log.") + line = file.readline().strip() + gisaid_isolate_df = pd.DataFrame(gisaid_isolate_log) + gisaid_segment_df = pd.DataFrame(gisaid_segment_log) + # Update GISAID submission status + if not gisaid_isolate_df.empty and not gisaid_segment_df.empty: + print("GISAID isolates and GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + elif not gisaid_isolate_df.empty: + print("GISAID isolates found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_isolate_df) + elif not gisaid_segment_df.empty: + print("GISAID segments found.") + upload_log.update_submission_status_csv(submission_dir=submission_dir, update_database="GISAID", update_df=gisaid_segment_df) + else: + print("Warning: no GISAID isolates or segments found") + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + gisaid_isolate_df = gisaid_isolate_df[~gisaid_isolate_df["gisaid_accession_epi_isl_id"].str.contains(r"EPI_ISL_\d*", regex = True, na = False)].copy() + return gisaid_isolate_df[["GS-SAMPLE_NAME"]] + +x_process_gisaid_log__mutmut_mutants : ClassVar[MutantDict] = { # type: ignore +'x_process_gisaid_log__mutmut_1': x_process_gisaid_log__mutmut_1, + 'x_process_gisaid_log__mutmut_2': x_process_gisaid_log__mutmut_2, + 'x_process_gisaid_log__mutmut_3': x_process_gisaid_log__mutmut_3, + 'x_process_gisaid_log__mutmut_4': x_process_gisaid_log__mutmut_4, + 'x_process_gisaid_log__mutmut_5': x_process_gisaid_log__mutmut_5, + 'x_process_gisaid_log__mutmut_6': x_process_gisaid_log__mutmut_6, + 'x_process_gisaid_log__mutmut_7': x_process_gisaid_log__mutmut_7, + 'x_process_gisaid_log__mutmut_8': x_process_gisaid_log__mutmut_8, + 'x_process_gisaid_log__mutmut_9': x_process_gisaid_log__mutmut_9, + 'x_process_gisaid_log__mutmut_10': x_process_gisaid_log__mutmut_10, + 'x_process_gisaid_log__mutmut_11': x_process_gisaid_log__mutmut_11, + 'x_process_gisaid_log__mutmut_12': x_process_gisaid_log__mutmut_12, + 'x_process_gisaid_log__mutmut_13': x_process_gisaid_log__mutmut_13, + 'x_process_gisaid_log__mutmut_14': x_process_gisaid_log__mutmut_14, + 'x_process_gisaid_log__mutmut_15': x_process_gisaid_log__mutmut_15, + 'x_process_gisaid_log__mutmut_16': x_process_gisaid_log__mutmut_16, + 'x_process_gisaid_log__mutmut_17': x_process_gisaid_log__mutmut_17, + 'x_process_gisaid_log__mutmut_18': x_process_gisaid_log__mutmut_18, + 'x_process_gisaid_log__mutmut_19': x_process_gisaid_log__mutmut_19, + 'x_process_gisaid_log__mutmut_20': x_process_gisaid_log__mutmut_20, + 'x_process_gisaid_log__mutmut_21': x_process_gisaid_log__mutmut_21, + 'x_process_gisaid_log__mutmut_22': x_process_gisaid_log__mutmut_22, + 'x_process_gisaid_log__mutmut_23': x_process_gisaid_log__mutmut_23, + 'x_process_gisaid_log__mutmut_24': x_process_gisaid_log__mutmut_24, + 'x_process_gisaid_log__mutmut_25': x_process_gisaid_log__mutmut_25, + 'x_process_gisaid_log__mutmut_26': x_process_gisaid_log__mutmut_26, + 'x_process_gisaid_log__mutmut_27': x_process_gisaid_log__mutmut_27, + 'x_process_gisaid_log__mutmut_28': x_process_gisaid_log__mutmut_28, + 'x_process_gisaid_log__mutmut_29': x_process_gisaid_log__mutmut_29, + 'x_process_gisaid_log__mutmut_30': x_process_gisaid_log__mutmut_30, + 'x_process_gisaid_log__mutmut_31': x_process_gisaid_log__mutmut_31, + 'x_process_gisaid_log__mutmut_32': x_process_gisaid_log__mutmut_32, + 'x_process_gisaid_log__mutmut_33': x_process_gisaid_log__mutmut_33, + 'x_process_gisaid_log__mutmut_34': x_process_gisaid_log__mutmut_34, + 'x_process_gisaid_log__mutmut_35': x_process_gisaid_log__mutmut_35, + 'x_process_gisaid_log__mutmut_36': x_process_gisaid_log__mutmut_36, + 'x_process_gisaid_log__mutmut_37': x_process_gisaid_log__mutmut_37, + 'x_process_gisaid_log__mutmut_38': x_process_gisaid_log__mutmut_38, + 'x_process_gisaid_log__mutmut_39': x_process_gisaid_log__mutmut_39, + 'x_process_gisaid_log__mutmut_40': x_process_gisaid_log__mutmut_40, + 'x_process_gisaid_log__mutmut_41': x_process_gisaid_log__mutmut_41, + 'x_process_gisaid_log__mutmut_42': x_process_gisaid_log__mutmut_42, + 'x_process_gisaid_log__mutmut_43': x_process_gisaid_log__mutmut_43, + 'x_process_gisaid_log__mutmut_44': x_process_gisaid_log__mutmut_44, + 'x_process_gisaid_log__mutmut_45': x_process_gisaid_log__mutmut_45, + 'x_process_gisaid_log__mutmut_46': x_process_gisaid_log__mutmut_46, + 'x_process_gisaid_log__mutmut_47': x_process_gisaid_log__mutmut_47, + 'x_process_gisaid_log__mutmut_48': x_process_gisaid_log__mutmut_48, + 'x_process_gisaid_log__mutmut_49': x_process_gisaid_log__mutmut_49, + 'x_process_gisaid_log__mutmut_50': x_process_gisaid_log__mutmut_50, + 'x_process_gisaid_log__mutmut_51': x_process_gisaid_log__mutmut_51, + 'x_process_gisaid_log__mutmut_52': x_process_gisaid_log__mutmut_52, + 'x_process_gisaid_log__mutmut_53': x_process_gisaid_log__mutmut_53, + 'x_process_gisaid_log__mutmut_54': x_process_gisaid_log__mutmut_54, + 'x_process_gisaid_log__mutmut_55': x_process_gisaid_log__mutmut_55, + 'x_process_gisaid_log__mutmut_56': x_process_gisaid_log__mutmut_56, + 'x_process_gisaid_log__mutmut_57': x_process_gisaid_log__mutmut_57, + 'x_process_gisaid_log__mutmut_58': x_process_gisaid_log__mutmut_58, + 'x_process_gisaid_log__mutmut_59': x_process_gisaid_log__mutmut_59, + 'x_process_gisaid_log__mutmut_60': x_process_gisaid_log__mutmut_60, + 'x_process_gisaid_log__mutmut_61': x_process_gisaid_log__mutmut_61, + 'x_process_gisaid_log__mutmut_62': x_process_gisaid_log__mutmut_62, + 'x_process_gisaid_log__mutmut_63': x_process_gisaid_log__mutmut_63, + 'x_process_gisaid_log__mutmut_64': x_process_gisaid_log__mutmut_64, + 'x_process_gisaid_log__mutmut_65': x_process_gisaid_log__mutmut_65, + 'x_process_gisaid_log__mutmut_66': x_process_gisaid_log__mutmut_66, + 'x_process_gisaid_log__mutmut_67': x_process_gisaid_log__mutmut_67, + 'x_process_gisaid_log__mutmut_68': x_process_gisaid_log__mutmut_68, + 'x_process_gisaid_log__mutmut_69': x_process_gisaid_log__mutmut_69, + 'x_process_gisaid_log__mutmut_70': x_process_gisaid_log__mutmut_70, + 'x_process_gisaid_log__mutmut_71': x_process_gisaid_log__mutmut_71, + 'x_process_gisaid_log__mutmut_72': x_process_gisaid_log__mutmut_72, + 'x_process_gisaid_log__mutmut_73': x_process_gisaid_log__mutmut_73, + 'x_process_gisaid_log__mutmut_74': x_process_gisaid_log__mutmut_74, + 'x_process_gisaid_log__mutmut_75': x_process_gisaid_log__mutmut_75, + 'x_process_gisaid_log__mutmut_76': x_process_gisaid_log__mutmut_76, + 'x_process_gisaid_log__mutmut_77': x_process_gisaid_log__mutmut_77, + 'x_process_gisaid_log__mutmut_78': x_process_gisaid_log__mutmut_78, + 'x_process_gisaid_log__mutmut_79': x_process_gisaid_log__mutmut_79, + 'x_process_gisaid_log__mutmut_80': x_process_gisaid_log__mutmut_80, + 'x_process_gisaid_log__mutmut_81': x_process_gisaid_log__mutmut_81, + 'x_process_gisaid_log__mutmut_82': x_process_gisaid_log__mutmut_82, + 'x_process_gisaid_log__mutmut_83': x_process_gisaid_log__mutmut_83, + 'x_process_gisaid_log__mutmut_84': x_process_gisaid_log__mutmut_84, + 'x_process_gisaid_log__mutmut_85': x_process_gisaid_log__mutmut_85, + 'x_process_gisaid_log__mutmut_86': x_process_gisaid_log__mutmut_86, + 'x_process_gisaid_log__mutmut_87': x_process_gisaid_log__mutmut_87, + 'x_process_gisaid_log__mutmut_88': x_process_gisaid_log__mutmut_88, + 'x_process_gisaid_log__mutmut_89': x_process_gisaid_log__mutmut_89, + 'x_process_gisaid_log__mutmut_90': x_process_gisaid_log__mutmut_90, + 'x_process_gisaid_log__mutmut_91': x_process_gisaid_log__mutmut_91, + 'x_process_gisaid_log__mutmut_92': x_process_gisaid_log__mutmut_92, + 'x_process_gisaid_log__mutmut_93': x_process_gisaid_log__mutmut_93, + 'x_process_gisaid_log__mutmut_94': x_process_gisaid_log__mutmut_94, + 'x_process_gisaid_log__mutmut_95': x_process_gisaid_log__mutmut_95, + 'x_process_gisaid_log__mutmut_96': x_process_gisaid_log__mutmut_96, + 'x_process_gisaid_log__mutmut_97': x_process_gisaid_log__mutmut_97, + 'x_process_gisaid_log__mutmut_98': x_process_gisaid_log__mutmut_98, + 'x_process_gisaid_log__mutmut_99': x_process_gisaid_log__mutmut_99, + 'x_process_gisaid_log__mutmut_100': x_process_gisaid_log__mutmut_100, + 'x_process_gisaid_log__mutmut_101': x_process_gisaid_log__mutmut_101, + 'x_process_gisaid_log__mutmut_102': x_process_gisaid_log__mutmut_102, + 'x_process_gisaid_log__mutmut_103': x_process_gisaid_log__mutmut_103, + 'x_process_gisaid_log__mutmut_104': x_process_gisaid_log__mutmut_104, + 'x_process_gisaid_log__mutmut_105': x_process_gisaid_log__mutmut_105, + 'x_process_gisaid_log__mutmut_106': x_process_gisaid_log__mutmut_106, + 'x_process_gisaid_log__mutmut_107': x_process_gisaid_log__mutmut_107, + 'x_process_gisaid_log__mutmut_108': x_process_gisaid_log__mutmut_108, + 'x_process_gisaid_log__mutmut_109': x_process_gisaid_log__mutmut_109, + 'x_process_gisaid_log__mutmut_110': x_process_gisaid_log__mutmut_110, + 'x_process_gisaid_log__mutmut_111': x_process_gisaid_log__mutmut_111, + 'x_process_gisaid_log__mutmut_112': x_process_gisaid_log__mutmut_112, + 'x_process_gisaid_log__mutmut_113': x_process_gisaid_log__mutmut_113, + 'x_process_gisaid_log__mutmut_114': x_process_gisaid_log__mutmut_114, + 'x_process_gisaid_log__mutmut_115': x_process_gisaid_log__mutmut_115, + 'x_process_gisaid_log__mutmut_116': x_process_gisaid_log__mutmut_116, + 'x_process_gisaid_log__mutmut_117': x_process_gisaid_log__mutmut_117, + 'x_process_gisaid_log__mutmut_118': x_process_gisaid_log__mutmut_118, + 'x_process_gisaid_log__mutmut_119': x_process_gisaid_log__mutmut_119, + 'x_process_gisaid_log__mutmut_120': x_process_gisaid_log__mutmut_120, + 'x_process_gisaid_log__mutmut_121': x_process_gisaid_log__mutmut_121, + 'x_process_gisaid_log__mutmut_122': x_process_gisaid_log__mutmut_122, + 'x_process_gisaid_log__mutmut_123': x_process_gisaid_log__mutmut_123, + 'x_process_gisaid_log__mutmut_124': x_process_gisaid_log__mutmut_124, + 'x_process_gisaid_log__mutmut_125': x_process_gisaid_log__mutmut_125, + 'x_process_gisaid_log__mutmut_126': x_process_gisaid_log__mutmut_126, + 'x_process_gisaid_log__mutmut_127': x_process_gisaid_log__mutmut_127, + 'x_process_gisaid_log__mutmut_128': x_process_gisaid_log__mutmut_128, + 'x_process_gisaid_log__mutmut_129': x_process_gisaid_log__mutmut_129, + 'x_process_gisaid_log__mutmut_130': x_process_gisaid_log__mutmut_130, + 'x_process_gisaid_log__mutmut_131': x_process_gisaid_log__mutmut_131, + 'x_process_gisaid_log__mutmut_132': x_process_gisaid_log__mutmut_132, + 'x_process_gisaid_log__mutmut_133': x_process_gisaid_log__mutmut_133, + 'x_process_gisaid_log__mutmut_134': x_process_gisaid_log__mutmut_134, + 'x_process_gisaid_log__mutmut_135': x_process_gisaid_log__mutmut_135, + 'x_process_gisaid_log__mutmut_136': x_process_gisaid_log__mutmut_136, + 'x_process_gisaid_log__mutmut_137': x_process_gisaid_log__mutmut_137, + 'x_process_gisaid_log__mutmut_138': x_process_gisaid_log__mutmut_138, + 'x_process_gisaid_log__mutmut_139': x_process_gisaid_log__mutmut_139, + 'x_process_gisaid_log__mutmut_140': x_process_gisaid_log__mutmut_140, + 'x_process_gisaid_log__mutmut_141': x_process_gisaid_log__mutmut_141, + 'x_process_gisaid_log__mutmut_142': x_process_gisaid_log__mutmut_142, + 'x_process_gisaid_log__mutmut_143': x_process_gisaid_log__mutmut_143, + 'x_process_gisaid_log__mutmut_144': x_process_gisaid_log__mutmut_144, + 'x_process_gisaid_log__mutmut_145': x_process_gisaid_log__mutmut_145, + 'x_process_gisaid_log__mutmut_146': x_process_gisaid_log__mutmut_146, + 'x_process_gisaid_log__mutmut_147': x_process_gisaid_log__mutmut_147, + 'x_process_gisaid_log__mutmut_148': x_process_gisaid_log__mutmut_148, + 'x_process_gisaid_log__mutmut_149': x_process_gisaid_log__mutmut_149, + 'x_process_gisaid_log__mutmut_150': x_process_gisaid_log__mutmut_150, + 'x_process_gisaid_log__mutmut_151': x_process_gisaid_log__mutmut_151, + 'x_process_gisaid_log__mutmut_152': x_process_gisaid_log__mutmut_152, + 'x_process_gisaid_log__mutmut_153': x_process_gisaid_log__mutmut_153, + 'x_process_gisaid_log__mutmut_154': x_process_gisaid_log__mutmut_154, + 'x_process_gisaid_log__mutmut_155': x_process_gisaid_log__mutmut_155, + 'x_process_gisaid_log__mutmut_156': x_process_gisaid_log__mutmut_156, + 'x_process_gisaid_log__mutmut_157': x_process_gisaid_log__mutmut_157, + 'x_process_gisaid_log__mutmut_158': x_process_gisaid_log__mutmut_158, + 'x_process_gisaid_log__mutmut_159': x_process_gisaid_log__mutmut_159, + 'x_process_gisaid_log__mutmut_160': x_process_gisaid_log__mutmut_160, + 'x_process_gisaid_log__mutmut_161': x_process_gisaid_log__mutmut_161, + 'x_process_gisaid_log__mutmut_162': x_process_gisaid_log__mutmut_162, + 'x_process_gisaid_log__mutmut_163': x_process_gisaid_log__mutmut_163, + 'x_process_gisaid_log__mutmut_164': x_process_gisaid_log__mutmut_164, + 'x_process_gisaid_log__mutmut_165': x_process_gisaid_log__mutmut_165, + 'x_process_gisaid_log__mutmut_166': x_process_gisaid_log__mutmut_166, + 'x_process_gisaid_log__mutmut_167': x_process_gisaid_log__mutmut_167, + 'x_process_gisaid_log__mutmut_168': x_process_gisaid_log__mutmut_168, + 'x_process_gisaid_log__mutmut_169': x_process_gisaid_log__mutmut_169, + 'x_process_gisaid_log__mutmut_170': x_process_gisaid_log__mutmut_170, + 'x_process_gisaid_log__mutmut_171': x_process_gisaid_log__mutmut_171, + 'x_process_gisaid_log__mutmut_172': x_process_gisaid_log__mutmut_172, + 'x_process_gisaid_log__mutmut_173': x_process_gisaid_log__mutmut_173, + 'x_process_gisaid_log__mutmut_174': x_process_gisaid_log__mutmut_174, + 'x_process_gisaid_log__mutmut_175': x_process_gisaid_log__mutmut_175, + 'x_process_gisaid_log__mutmut_176': x_process_gisaid_log__mutmut_176, + 'x_process_gisaid_log__mutmut_177': x_process_gisaid_log__mutmut_177, + 'x_process_gisaid_log__mutmut_178': x_process_gisaid_log__mutmut_178, + 'x_process_gisaid_log__mutmut_179': x_process_gisaid_log__mutmut_179, + 'x_process_gisaid_log__mutmut_180': x_process_gisaid_log__mutmut_180, + 'x_process_gisaid_log__mutmut_181': x_process_gisaid_log__mutmut_181, + 'x_process_gisaid_log__mutmut_182': x_process_gisaid_log__mutmut_182, + 'x_process_gisaid_log__mutmut_183': x_process_gisaid_log__mutmut_183, + 'x_process_gisaid_log__mutmut_184': x_process_gisaid_log__mutmut_184, + 'x_process_gisaid_log__mutmut_185': x_process_gisaid_log__mutmut_185, + 'x_process_gisaid_log__mutmut_186': x_process_gisaid_log__mutmut_186, + 'x_process_gisaid_log__mutmut_187': x_process_gisaid_log__mutmut_187, + 'x_process_gisaid_log__mutmut_188': x_process_gisaid_log__mutmut_188, + 'x_process_gisaid_log__mutmut_189': x_process_gisaid_log__mutmut_189, + 'x_process_gisaid_log__mutmut_190': x_process_gisaid_log__mutmut_190, + 'x_process_gisaid_log__mutmut_191': x_process_gisaid_log__mutmut_191, + 'x_process_gisaid_log__mutmut_192': x_process_gisaid_log__mutmut_192, + 'x_process_gisaid_log__mutmut_193': x_process_gisaid_log__mutmut_193, + 'x_process_gisaid_log__mutmut_194': x_process_gisaid_log__mutmut_194, + 'x_process_gisaid_log__mutmut_195': x_process_gisaid_log__mutmut_195, + 'x_process_gisaid_log__mutmut_196': x_process_gisaid_log__mutmut_196, + 'x_process_gisaid_log__mutmut_197': x_process_gisaid_log__mutmut_197, + 'x_process_gisaid_log__mutmut_198': x_process_gisaid_log__mutmut_198, + 'x_process_gisaid_log__mutmut_199': x_process_gisaid_log__mutmut_199, + 'x_process_gisaid_log__mutmut_200': x_process_gisaid_log__mutmut_200, + 'x_process_gisaid_log__mutmut_201': x_process_gisaid_log__mutmut_201, + 'x_process_gisaid_log__mutmut_202': x_process_gisaid_log__mutmut_202, + 'x_process_gisaid_log__mutmut_203': x_process_gisaid_log__mutmut_203, + 'x_process_gisaid_log__mutmut_204': x_process_gisaid_log__mutmut_204, + 'x_process_gisaid_log__mutmut_205': x_process_gisaid_log__mutmut_205, + 'x_process_gisaid_log__mutmut_206': x_process_gisaid_log__mutmut_206, + 'x_process_gisaid_log__mutmut_207': x_process_gisaid_log__mutmut_207, + 'x_process_gisaid_log__mutmut_208': x_process_gisaid_log__mutmut_208, + 'x_process_gisaid_log__mutmut_209': x_process_gisaid_log__mutmut_209, + 'x_process_gisaid_log__mutmut_210': x_process_gisaid_log__mutmut_210, + 'x_process_gisaid_log__mutmut_211': x_process_gisaid_log__mutmut_211, + 'x_process_gisaid_log__mutmut_212': x_process_gisaid_log__mutmut_212, + 'x_process_gisaid_log__mutmut_213': x_process_gisaid_log__mutmut_213, + 'x_process_gisaid_log__mutmut_214': x_process_gisaid_log__mutmut_214, + 'x_process_gisaid_log__mutmut_215': x_process_gisaid_log__mutmut_215, + 'x_process_gisaid_log__mutmut_216': x_process_gisaid_log__mutmut_216, + 'x_process_gisaid_log__mutmut_217': x_process_gisaid_log__mutmut_217, + 'x_process_gisaid_log__mutmut_218': x_process_gisaid_log__mutmut_218 +} +x_process_gisaid_log__mutmut_orig.__name__ = 'x_process_gisaid_log' + +# Submit to GISAID +def submit_gisaid(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + args = [organism, submission_dir, submission_name, config_dict, submission_type]# type: ignore + kwargs = {}# type: ignore + return _mutmut_trampoline(x_submit_gisaid__mutmut_orig, x_submit_gisaid__mutmut_mutants, args, kwargs, None) + +# Submit to GISAID +def x_submit_gisaid__mutmut_orig(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_1(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = None + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_2(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(None, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_3(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, None) + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_4(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join("metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_5(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, ) + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_6(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "XXmetadata.csvXX") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_7(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "METADATA.CSV") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_8(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = None + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_9(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(None, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_10(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, None) + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_11(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join("orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_12(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, ) + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_13(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "XXorig_metadata.csvXX") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_14(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "ORIG_METADATA.CSV") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_15(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = None + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_16(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(None, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_17(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, None) + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_18(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join("sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_19(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, ) + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_20(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "XXsequence.fsaXX") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_21(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "SEQUENCE.FSA") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_22(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = None + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_23(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(None, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_24(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, None) + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_25(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join("orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_26(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, ) + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_27(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "XXorig_sequence.fsaXX") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_28(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "ORIG_SEQUENCE.FSA") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_29(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = None + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_30(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(None, "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_31(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), None) + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_32(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join("submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_33(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), ) + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_34(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(None), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_35(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "XXsubmission_status_report.csvXX") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_36(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "SUBMISSION_STATUS_REPORT.CSV") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_37(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=None, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_38(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database=None) + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_39(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_40(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, ) + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_41(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="XXGISAIDXX") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_42(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="gisaid") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_43(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = None + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_44(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=None, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_45(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=None, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_46(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=None) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_47(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_48(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_49(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, ) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_50(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(None) + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_51(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(None) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_52(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(6) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_53(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = None + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_54(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 1 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_55(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts < 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_56(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 4: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_57(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts = 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_58(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts -= 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_59(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 2 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_60(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print(None) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_61(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " - str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_62(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n" - "Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_63(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("XX\nXX"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_64(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"XXSubmission attempt: XX" + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_65(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_66(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"SUBMISSION ATTEMPT: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_67(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(None)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_68(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = None + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_69(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(None, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_70(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, None) + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_71(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join("gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_72(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, ) + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_73(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) - ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_74(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" - str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_75(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "XXgisaid_upload_log_XX" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_76(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "GISAID_UPLOAD_LOG_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_77(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(None) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_78(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + "XX.txtXX") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_79(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".TXT") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_80(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(None) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_81(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) != True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_82(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == False: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_83(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(None) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_84(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = None + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_85(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run(None, + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_86(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_87(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=None, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_88(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=None) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_89(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run(cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_90(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_91(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_92(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, ) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_93(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "XXuploadXX", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_94(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "UPLOAD", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_95(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "XX--usernameXX", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_96(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--USERNAME", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_97(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["XXUsernameXX"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_98(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_99(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["USERNAME"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_100(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "XX--passwordXX", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_101(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--PASSWORD", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_102(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["XXPasswordXX"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_103(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_104(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["PASSWORD"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_105(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "XX--clientidXX", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_106(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--CLIENTID", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_107(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["XXClient-IdXX"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_108(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["client-id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_109(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["CLIENT-ID"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_110(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "XX--metadataXX", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_111(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--METADATA", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_112(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "XX--fastaXX", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_113(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--FASTA", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_114(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "XX--logXX", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_115(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--LOG", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_116(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "XX--debugXX"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_117(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--DEBUG"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_118(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode == 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_119(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 1: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_120(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print(None, file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_121(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=None) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_122(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print(file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_123(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", ) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_124(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("XXError: upload command errorXX", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_125(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_126(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("ERROR: UPLOAD COMMAND ERROR", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_127(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(None) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_128(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(None) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_129(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(None) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_130(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(2) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_131(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_132(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(None): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_133(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(None) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_134(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(11) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_135(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=None, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_136(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=None) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_137(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_138(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, ) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_139(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = None + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_140(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(None, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_141(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = None, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_142(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = None, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_143(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = None, encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_144(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding=None, index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_145(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=None) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_146(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_147(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_148(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_149(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_150(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_151(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", ) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_152(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 1, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_153(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "XXpythonXX", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_154(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "PYTHON", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_155(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="XXutf-8XX", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_156(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="UTF-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_157(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=True) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_158(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = None + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_159(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(None, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_160(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, None) + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_161(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join("metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_162(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, ) + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_163(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "XXmetadata.csvXX") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_164(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "METADATA.CSV") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_165(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = None + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_166(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(None, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_167(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, None) + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_168(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join("sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_169(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, ) + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_170(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "XXsequence.fsaXX") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_171(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "SEQUENCE.FSA") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_172(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "XXFLUXX" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_173(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "flu" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_174(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" not in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_175(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = None + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_176(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "XXIsolate_NameXX" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_177(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "isolate_name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_178(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "ISOLATE_NAME" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_179(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = None + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_180(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "XXgs-segment_nameXX" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_181(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "GS-SEGMENT_NAME" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_182(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = None + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_183(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) | ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_184(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_185(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(None, na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_186(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=None) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_187(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_188(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", ) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_189(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["XXgisaid_accession_epi_isl_idXX"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_190(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["GISAID_ACCESSION_EPI_ISL_ID"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_191(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("XXEPI_ISL_XX", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_192(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("epi_isl_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_193(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=True) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_194(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_195(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains(None, na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_196(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=None)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_197(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains(na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_198(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", )].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_199(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["XXgisaid_accession_epi_idXX"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_200(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["GISAID_ACCESSION_EPI_ID"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_201(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("XXEPIXX", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_202(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("epi", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_203(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=True)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_204(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = None + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_205(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["XXgs-sample_nameXX", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_206(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["GS-SAMPLE_NAME", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_207(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "XXgs-segment_nameXX"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_208(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "GS-SEGMENT_NAME"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_209(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "XXCOVXX" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_210(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "cov" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_211(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" not in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_212(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = None + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_213(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "XXcovv_virus_nameXX" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_214(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "COVV_VIRUS_NAME" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_215(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = None + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_216(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "XXgs-sample_nameXX" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_217(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "GS-SAMPLE_NAME" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_218(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = None + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_219(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_220(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(None, na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_221(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=None)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_222(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_223(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", )].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_224(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["XXgisaid_accession_epi_isl_idXX"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_225(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["GISAID_ACCESSION_EPI_ISL_ID"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_226(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("XXEPI_ISL_XX", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_227(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("epi_isl_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_228(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=True)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_229(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = None + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_230(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["XXgs-sample_nameXX"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_231(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["GS-SAMPLE_NAME"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_232(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = None + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_233(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() - "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_234(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.upper() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_235(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "XX_virus_nameXX" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_236(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_VIRUS_NAME" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_237(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = None + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_238(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "XXgs-sample_nameXX" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_239(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "GS-SAMPLE_NAME" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_240(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = None + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_241(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_242(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(None, na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_243(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=None)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_244(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains(na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_245(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", )].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_246(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["XXgisaid_accession_epi_isl_idXX"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_247(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["GISAID_ACCESSION_EPI_ISL_ID"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_248(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("XXEPI_ISL_XX", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_249(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("epi_isl_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_250(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=True)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_251(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = None + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_252(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["XXgs-sample_nameXX"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_253(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["GS-SAMPLE_NAME"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_254(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = None + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_255(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(None, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_256(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = None, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_257(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = None, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_258(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = None, encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_259(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding=None, index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_260(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=None) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_261(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_262(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_263(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_264(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_265(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_266(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", ) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_267(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 1, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_268(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "XXpythonXX", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_269(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "PYTHON", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_270(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="XXutf-8XX", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_271(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="UTF-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_272(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=True) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_273(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = None + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_274(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(None, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_275(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how=None, left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_276(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=None, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_277(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on=None) + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_278(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_279(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_280(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_281(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, ) + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_282(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="XXinnerXX", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_283(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="INNER", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_284(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="XXgs-sample_nameXX") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_285(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="GS-SAMPLE_NAME") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_286(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print(None) + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_287(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("XXUploading successfullyXX") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_288(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_289(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("UPLOADING SUCCESSFULLY") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_290(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print(None) + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_291(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) - ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_292(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" - str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_293(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir - "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_294(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " - submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_295(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("XXLog file is stored at: XX" + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_296(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_297(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("LOG FILE IS STORED AT: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_298(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "XX/gisaid_upload_log_attempt_XX" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_299(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/GISAID_UPLOAD_LOG_ATTEMPT_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_300(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(None) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_301(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + "XX.txtXX") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_302(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".TXT") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_303(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "XXPROCESSEDXX" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_304(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "processed" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_305(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = None + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_306(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = None + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_307(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=None, errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_308(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors=None) + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_309(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_310(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], ) + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_311(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["XXgs-sample_nameXX", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_312(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["GS-SAMPLE_NAME", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_313(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "XXgs-segment_nameXX"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_314(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "GS-SEGMENT_NAME"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_315(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="XXignoreXX") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_316(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="IGNORE") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_317(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(None, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_318(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = None, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_319(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = None) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_320(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_321(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_322(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, ) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_323(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = False, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_324(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = True) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_325(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = None + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_326(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(None, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_327(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, None) as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_328(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open("r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_329(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, ) as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_330(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "XXrXX") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_331(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "R") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_332(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = None + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_333(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(None, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_334(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, None) + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_335(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse("fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_336(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, ) + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_337(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "XXfastaXX") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_338(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "FASTA") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_339(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id not in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_340(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(None) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_341(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(None, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_342(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, None) as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_343(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open("w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_344(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, ) as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_345(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "XXw+XX") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_346(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "W+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_347(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(None, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_348(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, None, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_349(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, None) + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_350(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_351(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_352(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, ) + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_353(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "XXfastaXX") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_354(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "FASTA") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_355(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_356(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print(None, file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_357(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=None) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_358(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print(file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_359(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", ) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_360(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) - " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_361(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " - str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_362(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("XXError: XX" + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_363(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_364(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("ERROR: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_365(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(None) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_366(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + "XX sample(s) failed to upload to GISAIDXX", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_367(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to gisaid", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_368(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " SAMPLE(S) FAILED TO UPLOAD TO GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_369(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print(None, file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_370(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=None) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_371(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print(file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_372(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", ) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_373(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir - "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_374(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " - submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_375(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("XXPlease check log file at: XX" + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_376(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_377(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("PLEASE CHECK LOG FILE AT: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_378(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "XX/gisaid_upload_log_attempt_{1,2,3}.txtXX", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_379(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/GISAID_UPLOAD_LOG_ATTEMPT_{1,2,3}.TXT", file=sys.stderr) + return "ERROR" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_380(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "XXERRORXX" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_381(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "error" + else: + return "PROCESSED" + +# Submit to GISAID +def x_submit_gisaid__mutmut_382(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "XXPROCESSEDXX" + +# Submit to GISAID +def x_submit_gisaid__mutmut_383(organism: str, submission_dir: str, submission_name: str, config_dict: dict[str, Any], submission_type: str) -> str: + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + submission_status_file = os.path.join(os.path.dirname(submission_dir), "submission_status_report.csv") + # Extract user credentials (e.g. username, password, client-id) + tools.check_credentials(config_dict=config_dict, database="GISAID") + gisaid_cli = file_handler.validate_gisaid_installer(submission_dir=submission_dir, organism=organism, config_dict=config_dict) + print(f"Uploading sample files to GISAID-{organism}, as a '{submission_type}' submission. If this is not intended, interrupt immediately.") + time.sleep(5) + # Set number of attempt to 3 if erroring out occurs + attempts = 0 + # Submit to GISAID + while attempts <= 3: + attempts += 1 + print("\n"+"Submission attempt: " + str(attempts)) + # Create a log submission for each attempt + log_file = os.path.join(submission_dir, "gisaid_upload_log_" + str(attempts) + ".txt") + # If log file exists, removes it + if os.path.isfile(log_file) == True: + os.remove(log_file) + # Upload submission + command = subprocess.run([gisaid_cli, "upload", "--username", config_dict["Username"], "--password", config_dict["Password"], "--clientid", config_dict["Client-Id"], "--metadata", metadata, "--fasta", fasta, "--log", log_file, "--debug"], + cwd=submission_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Check if uploading is successful + if command.returncode != 0: + print("Error: upload command error", file=sys.stderr) + print(command.stdout) + print(command.stderr) + sys.exit(1) + # Check if log file exists + while not os.path.exists(log_file): + time.sleep(10) + # Check submission log to see if all samples are uploaded successfully + process_gisaid_log(log_file=log_file, submission_dir=submission_dir) + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + # Filter out samples with accession + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False) & ~status_df["gisaid_accession_epi_id"].str.contains("EPI", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = status_df[~status_df["gisaid_accession_epi_isl_id"].str.contains("EPI_ISL_", na=False)].copy() + gisaid_status_df = gisaid_status_df[["gs-sample_name"]] + # Identify remaining samples + metadata_df = pd.read_csv(orig_metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + if metadata_df.empty: + print("Uploading successfully") + print("Log file is stored at: " + submission_dir + "/gisaid_upload_log_attempt_" + str(attempts) + ".txt") + return "PROCESSED" + # Update metadata file + fasta_names = gisaid_status_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(metadata, header = True, index = False) + # Update fasta file + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + if not metadata_df.empty: + print("Error: " + str(len(metadata_df.index)) + " sample(s) failed to upload to GISAID", file=sys.stderr) + print("Please check log file at: " + submission_dir + "/gisaid_upload_log_attempt_{1,2,3}.txt", file=sys.stderr) + return "ERROR" + else: + return "processed" + +x_submit_gisaid__mutmut_mutants : ClassVar[MutantDict] = { # type: ignore +'x_submit_gisaid__mutmut_1': x_submit_gisaid__mutmut_1, + 'x_submit_gisaid__mutmut_2': x_submit_gisaid__mutmut_2, + 'x_submit_gisaid__mutmut_3': x_submit_gisaid__mutmut_3, + 'x_submit_gisaid__mutmut_4': x_submit_gisaid__mutmut_4, + 'x_submit_gisaid__mutmut_5': x_submit_gisaid__mutmut_5, + 'x_submit_gisaid__mutmut_6': x_submit_gisaid__mutmut_6, + 'x_submit_gisaid__mutmut_7': x_submit_gisaid__mutmut_7, + 'x_submit_gisaid__mutmut_8': x_submit_gisaid__mutmut_8, + 'x_submit_gisaid__mutmut_9': x_submit_gisaid__mutmut_9, + 'x_submit_gisaid__mutmut_10': x_submit_gisaid__mutmut_10, + 'x_submit_gisaid__mutmut_11': x_submit_gisaid__mutmut_11, + 'x_submit_gisaid__mutmut_12': x_submit_gisaid__mutmut_12, + 'x_submit_gisaid__mutmut_13': x_submit_gisaid__mutmut_13, + 'x_submit_gisaid__mutmut_14': x_submit_gisaid__mutmut_14, + 'x_submit_gisaid__mutmut_15': x_submit_gisaid__mutmut_15, + 'x_submit_gisaid__mutmut_16': x_submit_gisaid__mutmut_16, + 'x_submit_gisaid__mutmut_17': x_submit_gisaid__mutmut_17, + 'x_submit_gisaid__mutmut_18': x_submit_gisaid__mutmut_18, + 'x_submit_gisaid__mutmut_19': x_submit_gisaid__mutmut_19, + 'x_submit_gisaid__mutmut_20': x_submit_gisaid__mutmut_20, + 'x_submit_gisaid__mutmut_21': x_submit_gisaid__mutmut_21, + 'x_submit_gisaid__mutmut_22': x_submit_gisaid__mutmut_22, + 'x_submit_gisaid__mutmut_23': x_submit_gisaid__mutmut_23, + 'x_submit_gisaid__mutmut_24': x_submit_gisaid__mutmut_24, + 'x_submit_gisaid__mutmut_25': x_submit_gisaid__mutmut_25, + 'x_submit_gisaid__mutmut_26': x_submit_gisaid__mutmut_26, + 'x_submit_gisaid__mutmut_27': x_submit_gisaid__mutmut_27, + 'x_submit_gisaid__mutmut_28': x_submit_gisaid__mutmut_28, + 'x_submit_gisaid__mutmut_29': x_submit_gisaid__mutmut_29, + 'x_submit_gisaid__mutmut_30': x_submit_gisaid__mutmut_30, + 'x_submit_gisaid__mutmut_31': x_submit_gisaid__mutmut_31, + 'x_submit_gisaid__mutmut_32': x_submit_gisaid__mutmut_32, + 'x_submit_gisaid__mutmut_33': x_submit_gisaid__mutmut_33, + 'x_submit_gisaid__mutmut_34': x_submit_gisaid__mutmut_34, + 'x_submit_gisaid__mutmut_35': x_submit_gisaid__mutmut_35, + 'x_submit_gisaid__mutmut_36': x_submit_gisaid__mutmut_36, + 'x_submit_gisaid__mutmut_37': x_submit_gisaid__mutmut_37, + 'x_submit_gisaid__mutmut_38': x_submit_gisaid__mutmut_38, + 'x_submit_gisaid__mutmut_39': x_submit_gisaid__mutmut_39, + 'x_submit_gisaid__mutmut_40': x_submit_gisaid__mutmut_40, + 'x_submit_gisaid__mutmut_41': x_submit_gisaid__mutmut_41, + 'x_submit_gisaid__mutmut_42': x_submit_gisaid__mutmut_42, + 'x_submit_gisaid__mutmut_43': x_submit_gisaid__mutmut_43, + 'x_submit_gisaid__mutmut_44': x_submit_gisaid__mutmut_44, + 'x_submit_gisaid__mutmut_45': x_submit_gisaid__mutmut_45, + 'x_submit_gisaid__mutmut_46': x_submit_gisaid__mutmut_46, + 'x_submit_gisaid__mutmut_47': x_submit_gisaid__mutmut_47, + 'x_submit_gisaid__mutmut_48': x_submit_gisaid__mutmut_48, + 'x_submit_gisaid__mutmut_49': x_submit_gisaid__mutmut_49, + 'x_submit_gisaid__mutmut_50': x_submit_gisaid__mutmut_50, + 'x_submit_gisaid__mutmut_51': x_submit_gisaid__mutmut_51, + 'x_submit_gisaid__mutmut_52': x_submit_gisaid__mutmut_52, + 'x_submit_gisaid__mutmut_53': x_submit_gisaid__mutmut_53, + 'x_submit_gisaid__mutmut_54': x_submit_gisaid__mutmut_54, + 'x_submit_gisaid__mutmut_55': x_submit_gisaid__mutmut_55, + 'x_submit_gisaid__mutmut_56': x_submit_gisaid__mutmut_56, + 'x_submit_gisaid__mutmut_57': x_submit_gisaid__mutmut_57, + 'x_submit_gisaid__mutmut_58': x_submit_gisaid__mutmut_58, + 'x_submit_gisaid__mutmut_59': x_submit_gisaid__mutmut_59, + 'x_submit_gisaid__mutmut_60': x_submit_gisaid__mutmut_60, + 'x_submit_gisaid__mutmut_61': x_submit_gisaid__mutmut_61, + 'x_submit_gisaid__mutmut_62': x_submit_gisaid__mutmut_62, + 'x_submit_gisaid__mutmut_63': x_submit_gisaid__mutmut_63, + 'x_submit_gisaid__mutmut_64': x_submit_gisaid__mutmut_64, + 'x_submit_gisaid__mutmut_65': x_submit_gisaid__mutmut_65, + 'x_submit_gisaid__mutmut_66': x_submit_gisaid__mutmut_66, + 'x_submit_gisaid__mutmut_67': x_submit_gisaid__mutmut_67, + 'x_submit_gisaid__mutmut_68': x_submit_gisaid__mutmut_68, + 'x_submit_gisaid__mutmut_69': x_submit_gisaid__mutmut_69, + 'x_submit_gisaid__mutmut_70': x_submit_gisaid__mutmut_70, + 'x_submit_gisaid__mutmut_71': x_submit_gisaid__mutmut_71, + 'x_submit_gisaid__mutmut_72': x_submit_gisaid__mutmut_72, + 'x_submit_gisaid__mutmut_73': x_submit_gisaid__mutmut_73, + 'x_submit_gisaid__mutmut_74': x_submit_gisaid__mutmut_74, + 'x_submit_gisaid__mutmut_75': x_submit_gisaid__mutmut_75, + 'x_submit_gisaid__mutmut_76': x_submit_gisaid__mutmut_76, + 'x_submit_gisaid__mutmut_77': x_submit_gisaid__mutmut_77, + 'x_submit_gisaid__mutmut_78': x_submit_gisaid__mutmut_78, + 'x_submit_gisaid__mutmut_79': x_submit_gisaid__mutmut_79, + 'x_submit_gisaid__mutmut_80': x_submit_gisaid__mutmut_80, + 'x_submit_gisaid__mutmut_81': x_submit_gisaid__mutmut_81, + 'x_submit_gisaid__mutmut_82': x_submit_gisaid__mutmut_82, + 'x_submit_gisaid__mutmut_83': x_submit_gisaid__mutmut_83, + 'x_submit_gisaid__mutmut_84': x_submit_gisaid__mutmut_84, + 'x_submit_gisaid__mutmut_85': x_submit_gisaid__mutmut_85, + 'x_submit_gisaid__mutmut_86': x_submit_gisaid__mutmut_86, + 'x_submit_gisaid__mutmut_87': x_submit_gisaid__mutmut_87, + 'x_submit_gisaid__mutmut_88': x_submit_gisaid__mutmut_88, + 'x_submit_gisaid__mutmut_89': x_submit_gisaid__mutmut_89, + 'x_submit_gisaid__mutmut_90': x_submit_gisaid__mutmut_90, + 'x_submit_gisaid__mutmut_91': x_submit_gisaid__mutmut_91, + 'x_submit_gisaid__mutmut_92': x_submit_gisaid__mutmut_92, + 'x_submit_gisaid__mutmut_93': x_submit_gisaid__mutmut_93, + 'x_submit_gisaid__mutmut_94': x_submit_gisaid__mutmut_94, + 'x_submit_gisaid__mutmut_95': x_submit_gisaid__mutmut_95, + 'x_submit_gisaid__mutmut_96': x_submit_gisaid__mutmut_96, + 'x_submit_gisaid__mutmut_97': x_submit_gisaid__mutmut_97, + 'x_submit_gisaid__mutmut_98': x_submit_gisaid__mutmut_98, + 'x_submit_gisaid__mutmut_99': x_submit_gisaid__mutmut_99, + 'x_submit_gisaid__mutmut_100': x_submit_gisaid__mutmut_100, + 'x_submit_gisaid__mutmut_101': x_submit_gisaid__mutmut_101, + 'x_submit_gisaid__mutmut_102': x_submit_gisaid__mutmut_102, + 'x_submit_gisaid__mutmut_103': x_submit_gisaid__mutmut_103, + 'x_submit_gisaid__mutmut_104': x_submit_gisaid__mutmut_104, + 'x_submit_gisaid__mutmut_105': x_submit_gisaid__mutmut_105, + 'x_submit_gisaid__mutmut_106': x_submit_gisaid__mutmut_106, + 'x_submit_gisaid__mutmut_107': x_submit_gisaid__mutmut_107, + 'x_submit_gisaid__mutmut_108': x_submit_gisaid__mutmut_108, + 'x_submit_gisaid__mutmut_109': x_submit_gisaid__mutmut_109, + 'x_submit_gisaid__mutmut_110': x_submit_gisaid__mutmut_110, + 'x_submit_gisaid__mutmut_111': x_submit_gisaid__mutmut_111, + 'x_submit_gisaid__mutmut_112': x_submit_gisaid__mutmut_112, + 'x_submit_gisaid__mutmut_113': x_submit_gisaid__mutmut_113, + 'x_submit_gisaid__mutmut_114': x_submit_gisaid__mutmut_114, + 'x_submit_gisaid__mutmut_115': x_submit_gisaid__mutmut_115, + 'x_submit_gisaid__mutmut_116': x_submit_gisaid__mutmut_116, + 'x_submit_gisaid__mutmut_117': x_submit_gisaid__mutmut_117, + 'x_submit_gisaid__mutmut_118': x_submit_gisaid__mutmut_118, + 'x_submit_gisaid__mutmut_119': x_submit_gisaid__mutmut_119, + 'x_submit_gisaid__mutmut_120': x_submit_gisaid__mutmut_120, + 'x_submit_gisaid__mutmut_121': x_submit_gisaid__mutmut_121, + 'x_submit_gisaid__mutmut_122': x_submit_gisaid__mutmut_122, + 'x_submit_gisaid__mutmut_123': x_submit_gisaid__mutmut_123, + 'x_submit_gisaid__mutmut_124': x_submit_gisaid__mutmut_124, + 'x_submit_gisaid__mutmut_125': x_submit_gisaid__mutmut_125, + 'x_submit_gisaid__mutmut_126': x_submit_gisaid__mutmut_126, + 'x_submit_gisaid__mutmut_127': x_submit_gisaid__mutmut_127, + 'x_submit_gisaid__mutmut_128': x_submit_gisaid__mutmut_128, + 'x_submit_gisaid__mutmut_129': x_submit_gisaid__mutmut_129, + 'x_submit_gisaid__mutmut_130': x_submit_gisaid__mutmut_130, + 'x_submit_gisaid__mutmut_131': x_submit_gisaid__mutmut_131, + 'x_submit_gisaid__mutmut_132': x_submit_gisaid__mutmut_132, + 'x_submit_gisaid__mutmut_133': x_submit_gisaid__mutmut_133, + 'x_submit_gisaid__mutmut_134': x_submit_gisaid__mutmut_134, + 'x_submit_gisaid__mutmut_135': x_submit_gisaid__mutmut_135, + 'x_submit_gisaid__mutmut_136': x_submit_gisaid__mutmut_136, + 'x_submit_gisaid__mutmut_137': x_submit_gisaid__mutmut_137, + 'x_submit_gisaid__mutmut_138': x_submit_gisaid__mutmut_138, + 'x_submit_gisaid__mutmut_139': x_submit_gisaid__mutmut_139, + 'x_submit_gisaid__mutmut_140': x_submit_gisaid__mutmut_140, + 'x_submit_gisaid__mutmut_141': x_submit_gisaid__mutmut_141, + 'x_submit_gisaid__mutmut_142': x_submit_gisaid__mutmut_142, + 'x_submit_gisaid__mutmut_143': x_submit_gisaid__mutmut_143, + 'x_submit_gisaid__mutmut_144': x_submit_gisaid__mutmut_144, + 'x_submit_gisaid__mutmut_145': x_submit_gisaid__mutmut_145, + 'x_submit_gisaid__mutmut_146': x_submit_gisaid__mutmut_146, + 'x_submit_gisaid__mutmut_147': x_submit_gisaid__mutmut_147, + 'x_submit_gisaid__mutmut_148': x_submit_gisaid__mutmut_148, + 'x_submit_gisaid__mutmut_149': x_submit_gisaid__mutmut_149, + 'x_submit_gisaid__mutmut_150': x_submit_gisaid__mutmut_150, + 'x_submit_gisaid__mutmut_151': x_submit_gisaid__mutmut_151, + 'x_submit_gisaid__mutmut_152': x_submit_gisaid__mutmut_152, + 'x_submit_gisaid__mutmut_153': x_submit_gisaid__mutmut_153, + 'x_submit_gisaid__mutmut_154': x_submit_gisaid__mutmut_154, + 'x_submit_gisaid__mutmut_155': x_submit_gisaid__mutmut_155, + 'x_submit_gisaid__mutmut_156': x_submit_gisaid__mutmut_156, + 'x_submit_gisaid__mutmut_157': x_submit_gisaid__mutmut_157, + 'x_submit_gisaid__mutmut_158': x_submit_gisaid__mutmut_158, + 'x_submit_gisaid__mutmut_159': x_submit_gisaid__mutmut_159, + 'x_submit_gisaid__mutmut_160': x_submit_gisaid__mutmut_160, + 'x_submit_gisaid__mutmut_161': x_submit_gisaid__mutmut_161, + 'x_submit_gisaid__mutmut_162': x_submit_gisaid__mutmut_162, + 'x_submit_gisaid__mutmut_163': x_submit_gisaid__mutmut_163, + 'x_submit_gisaid__mutmut_164': x_submit_gisaid__mutmut_164, + 'x_submit_gisaid__mutmut_165': x_submit_gisaid__mutmut_165, + 'x_submit_gisaid__mutmut_166': x_submit_gisaid__mutmut_166, + 'x_submit_gisaid__mutmut_167': x_submit_gisaid__mutmut_167, + 'x_submit_gisaid__mutmut_168': x_submit_gisaid__mutmut_168, + 'x_submit_gisaid__mutmut_169': x_submit_gisaid__mutmut_169, + 'x_submit_gisaid__mutmut_170': x_submit_gisaid__mutmut_170, + 'x_submit_gisaid__mutmut_171': x_submit_gisaid__mutmut_171, + 'x_submit_gisaid__mutmut_172': x_submit_gisaid__mutmut_172, + 'x_submit_gisaid__mutmut_173': x_submit_gisaid__mutmut_173, + 'x_submit_gisaid__mutmut_174': x_submit_gisaid__mutmut_174, + 'x_submit_gisaid__mutmut_175': x_submit_gisaid__mutmut_175, + 'x_submit_gisaid__mutmut_176': x_submit_gisaid__mutmut_176, + 'x_submit_gisaid__mutmut_177': x_submit_gisaid__mutmut_177, + 'x_submit_gisaid__mutmut_178': x_submit_gisaid__mutmut_178, + 'x_submit_gisaid__mutmut_179': x_submit_gisaid__mutmut_179, + 'x_submit_gisaid__mutmut_180': x_submit_gisaid__mutmut_180, + 'x_submit_gisaid__mutmut_181': x_submit_gisaid__mutmut_181, + 'x_submit_gisaid__mutmut_182': x_submit_gisaid__mutmut_182, + 'x_submit_gisaid__mutmut_183': x_submit_gisaid__mutmut_183, + 'x_submit_gisaid__mutmut_184': x_submit_gisaid__mutmut_184, + 'x_submit_gisaid__mutmut_185': x_submit_gisaid__mutmut_185, + 'x_submit_gisaid__mutmut_186': x_submit_gisaid__mutmut_186, + 'x_submit_gisaid__mutmut_187': x_submit_gisaid__mutmut_187, + 'x_submit_gisaid__mutmut_188': x_submit_gisaid__mutmut_188, + 'x_submit_gisaid__mutmut_189': x_submit_gisaid__mutmut_189, + 'x_submit_gisaid__mutmut_190': x_submit_gisaid__mutmut_190, + 'x_submit_gisaid__mutmut_191': x_submit_gisaid__mutmut_191, + 'x_submit_gisaid__mutmut_192': x_submit_gisaid__mutmut_192, + 'x_submit_gisaid__mutmut_193': x_submit_gisaid__mutmut_193, + 'x_submit_gisaid__mutmut_194': x_submit_gisaid__mutmut_194, + 'x_submit_gisaid__mutmut_195': x_submit_gisaid__mutmut_195, + 'x_submit_gisaid__mutmut_196': x_submit_gisaid__mutmut_196, + 'x_submit_gisaid__mutmut_197': x_submit_gisaid__mutmut_197, + 'x_submit_gisaid__mutmut_198': x_submit_gisaid__mutmut_198, + 'x_submit_gisaid__mutmut_199': x_submit_gisaid__mutmut_199, + 'x_submit_gisaid__mutmut_200': x_submit_gisaid__mutmut_200, + 'x_submit_gisaid__mutmut_201': x_submit_gisaid__mutmut_201, + 'x_submit_gisaid__mutmut_202': x_submit_gisaid__mutmut_202, + 'x_submit_gisaid__mutmut_203': x_submit_gisaid__mutmut_203, + 'x_submit_gisaid__mutmut_204': x_submit_gisaid__mutmut_204, + 'x_submit_gisaid__mutmut_205': x_submit_gisaid__mutmut_205, + 'x_submit_gisaid__mutmut_206': x_submit_gisaid__mutmut_206, + 'x_submit_gisaid__mutmut_207': x_submit_gisaid__mutmut_207, + 'x_submit_gisaid__mutmut_208': x_submit_gisaid__mutmut_208, + 'x_submit_gisaid__mutmut_209': x_submit_gisaid__mutmut_209, + 'x_submit_gisaid__mutmut_210': x_submit_gisaid__mutmut_210, + 'x_submit_gisaid__mutmut_211': x_submit_gisaid__mutmut_211, + 'x_submit_gisaid__mutmut_212': x_submit_gisaid__mutmut_212, + 'x_submit_gisaid__mutmut_213': x_submit_gisaid__mutmut_213, + 'x_submit_gisaid__mutmut_214': x_submit_gisaid__mutmut_214, + 'x_submit_gisaid__mutmut_215': x_submit_gisaid__mutmut_215, + 'x_submit_gisaid__mutmut_216': x_submit_gisaid__mutmut_216, + 'x_submit_gisaid__mutmut_217': x_submit_gisaid__mutmut_217, + 'x_submit_gisaid__mutmut_218': x_submit_gisaid__mutmut_218, + 'x_submit_gisaid__mutmut_219': x_submit_gisaid__mutmut_219, + 'x_submit_gisaid__mutmut_220': x_submit_gisaid__mutmut_220, + 'x_submit_gisaid__mutmut_221': x_submit_gisaid__mutmut_221, + 'x_submit_gisaid__mutmut_222': x_submit_gisaid__mutmut_222, + 'x_submit_gisaid__mutmut_223': x_submit_gisaid__mutmut_223, + 'x_submit_gisaid__mutmut_224': x_submit_gisaid__mutmut_224, + 'x_submit_gisaid__mutmut_225': x_submit_gisaid__mutmut_225, + 'x_submit_gisaid__mutmut_226': x_submit_gisaid__mutmut_226, + 'x_submit_gisaid__mutmut_227': x_submit_gisaid__mutmut_227, + 'x_submit_gisaid__mutmut_228': x_submit_gisaid__mutmut_228, + 'x_submit_gisaid__mutmut_229': x_submit_gisaid__mutmut_229, + 'x_submit_gisaid__mutmut_230': x_submit_gisaid__mutmut_230, + 'x_submit_gisaid__mutmut_231': x_submit_gisaid__mutmut_231, + 'x_submit_gisaid__mutmut_232': x_submit_gisaid__mutmut_232, + 'x_submit_gisaid__mutmut_233': x_submit_gisaid__mutmut_233, + 'x_submit_gisaid__mutmut_234': x_submit_gisaid__mutmut_234, + 'x_submit_gisaid__mutmut_235': x_submit_gisaid__mutmut_235, + 'x_submit_gisaid__mutmut_236': x_submit_gisaid__mutmut_236, + 'x_submit_gisaid__mutmut_237': x_submit_gisaid__mutmut_237, + 'x_submit_gisaid__mutmut_238': x_submit_gisaid__mutmut_238, + 'x_submit_gisaid__mutmut_239': x_submit_gisaid__mutmut_239, + 'x_submit_gisaid__mutmut_240': x_submit_gisaid__mutmut_240, + 'x_submit_gisaid__mutmut_241': x_submit_gisaid__mutmut_241, + 'x_submit_gisaid__mutmut_242': x_submit_gisaid__mutmut_242, + 'x_submit_gisaid__mutmut_243': x_submit_gisaid__mutmut_243, + 'x_submit_gisaid__mutmut_244': x_submit_gisaid__mutmut_244, + 'x_submit_gisaid__mutmut_245': x_submit_gisaid__mutmut_245, + 'x_submit_gisaid__mutmut_246': x_submit_gisaid__mutmut_246, + 'x_submit_gisaid__mutmut_247': x_submit_gisaid__mutmut_247, + 'x_submit_gisaid__mutmut_248': x_submit_gisaid__mutmut_248, + 'x_submit_gisaid__mutmut_249': x_submit_gisaid__mutmut_249, + 'x_submit_gisaid__mutmut_250': x_submit_gisaid__mutmut_250, + 'x_submit_gisaid__mutmut_251': x_submit_gisaid__mutmut_251, + 'x_submit_gisaid__mutmut_252': x_submit_gisaid__mutmut_252, + 'x_submit_gisaid__mutmut_253': x_submit_gisaid__mutmut_253, + 'x_submit_gisaid__mutmut_254': x_submit_gisaid__mutmut_254, + 'x_submit_gisaid__mutmut_255': x_submit_gisaid__mutmut_255, + 'x_submit_gisaid__mutmut_256': x_submit_gisaid__mutmut_256, + 'x_submit_gisaid__mutmut_257': x_submit_gisaid__mutmut_257, + 'x_submit_gisaid__mutmut_258': x_submit_gisaid__mutmut_258, + 'x_submit_gisaid__mutmut_259': x_submit_gisaid__mutmut_259, + 'x_submit_gisaid__mutmut_260': x_submit_gisaid__mutmut_260, + 'x_submit_gisaid__mutmut_261': x_submit_gisaid__mutmut_261, + 'x_submit_gisaid__mutmut_262': x_submit_gisaid__mutmut_262, + 'x_submit_gisaid__mutmut_263': x_submit_gisaid__mutmut_263, + 'x_submit_gisaid__mutmut_264': x_submit_gisaid__mutmut_264, + 'x_submit_gisaid__mutmut_265': x_submit_gisaid__mutmut_265, + 'x_submit_gisaid__mutmut_266': x_submit_gisaid__mutmut_266, + 'x_submit_gisaid__mutmut_267': x_submit_gisaid__mutmut_267, + 'x_submit_gisaid__mutmut_268': x_submit_gisaid__mutmut_268, + 'x_submit_gisaid__mutmut_269': x_submit_gisaid__mutmut_269, + 'x_submit_gisaid__mutmut_270': x_submit_gisaid__mutmut_270, + 'x_submit_gisaid__mutmut_271': x_submit_gisaid__mutmut_271, + 'x_submit_gisaid__mutmut_272': x_submit_gisaid__mutmut_272, + 'x_submit_gisaid__mutmut_273': x_submit_gisaid__mutmut_273, + 'x_submit_gisaid__mutmut_274': x_submit_gisaid__mutmut_274, + 'x_submit_gisaid__mutmut_275': x_submit_gisaid__mutmut_275, + 'x_submit_gisaid__mutmut_276': x_submit_gisaid__mutmut_276, + 'x_submit_gisaid__mutmut_277': x_submit_gisaid__mutmut_277, + 'x_submit_gisaid__mutmut_278': x_submit_gisaid__mutmut_278, + 'x_submit_gisaid__mutmut_279': x_submit_gisaid__mutmut_279, + 'x_submit_gisaid__mutmut_280': x_submit_gisaid__mutmut_280, + 'x_submit_gisaid__mutmut_281': x_submit_gisaid__mutmut_281, + 'x_submit_gisaid__mutmut_282': x_submit_gisaid__mutmut_282, + 'x_submit_gisaid__mutmut_283': x_submit_gisaid__mutmut_283, + 'x_submit_gisaid__mutmut_284': x_submit_gisaid__mutmut_284, + 'x_submit_gisaid__mutmut_285': x_submit_gisaid__mutmut_285, + 'x_submit_gisaid__mutmut_286': x_submit_gisaid__mutmut_286, + 'x_submit_gisaid__mutmut_287': x_submit_gisaid__mutmut_287, + 'x_submit_gisaid__mutmut_288': x_submit_gisaid__mutmut_288, + 'x_submit_gisaid__mutmut_289': x_submit_gisaid__mutmut_289, + 'x_submit_gisaid__mutmut_290': x_submit_gisaid__mutmut_290, + 'x_submit_gisaid__mutmut_291': x_submit_gisaid__mutmut_291, + 'x_submit_gisaid__mutmut_292': x_submit_gisaid__mutmut_292, + 'x_submit_gisaid__mutmut_293': x_submit_gisaid__mutmut_293, + 'x_submit_gisaid__mutmut_294': x_submit_gisaid__mutmut_294, + 'x_submit_gisaid__mutmut_295': x_submit_gisaid__mutmut_295, + 'x_submit_gisaid__mutmut_296': x_submit_gisaid__mutmut_296, + 'x_submit_gisaid__mutmut_297': x_submit_gisaid__mutmut_297, + 'x_submit_gisaid__mutmut_298': x_submit_gisaid__mutmut_298, + 'x_submit_gisaid__mutmut_299': x_submit_gisaid__mutmut_299, + 'x_submit_gisaid__mutmut_300': x_submit_gisaid__mutmut_300, + 'x_submit_gisaid__mutmut_301': x_submit_gisaid__mutmut_301, + 'x_submit_gisaid__mutmut_302': x_submit_gisaid__mutmut_302, + 'x_submit_gisaid__mutmut_303': x_submit_gisaid__mutmut_303, + 'x_submit_gisaid__mutmut_304': x_submit_gisaid__mutmut_304, + 'x_submit_gisaid__mutmut_305': x_submit_gisaid__mutmut_305, + 'x_submit_gisaid__mutmut_306': x_submit_gisaid__mutmut_306, + 'x_submit_gisaid__mutmut_307': x_submit_gisaid__mutmut_307, + 'x_submit_gisaid__mutmut_308': x_submit_gisaid__mutmut_308, + 'x_submit_gisaid__mutmut_309': x_submit_gisaid__mutmut_309, + 'x_submit_gisaid__mutmut_310': x_submit_gisaid__mutmut_310, + 'x_submit_gisaid__mutmut_311': x_submit_gisaid__mutmut_311, + 'x_submit_gisaid__mutmut_312': x_submit_gisaid__mutmut_312, + 'x_submit_gisaid__mutmut_313': x_submit_gisaid__mutmut_313, + 'x_submit_gisaid__mutmut_314': x_submit_gisaid__mutmut_314, + 'x_submit_gisaid__mutmut_315': x_submit_gisaid__mutmut_315, + 'x_submit_gisaid__mutmut_316': x_submit_gisaid__mutmut_316, + 'x_submit_gisaid__mutmut_317': x_submit_gisaid__mutmut_317, + 'x_submit_gisaid__mutmut_318': x_submit_gisaid__mutmut_318, + 'x_submit_gisaid__mutmut_319': x_submit_gisaid__mutmut_319, + 'x_submit_gisaid__mutmut_320': x_submit_gisaid__mutmut_320, + 'x_submit_gisaid__mutmut_321': x_submit_gisaid__mutmut_321, + 'x_submit_gisaid__mutmut_322': x_submit_gisaid__mutmut_322, + 'x_submit_gisaid__mutmut_323': x_submit_gisaid__mutmut_323, + 'x_submit_gisaid__mutmut_324': x_submit_gisaid__mutmut_324, + 'x_submit_gisaid__mutmut_325': x_submit_gisaid__mutmut_325, + 'x_submit_gisaid__mutmut_326': x_submit_gisaid__mutmut_326, + 'x_submit_gisaid__mutmut_327': x_submit_gisaid__mutmut_327, + 'x_submit_gisaid__mutmut_328': x_submit_gisaid__mutmut_328, + 'x_submit_gisaid__mutmut_329': x_submit_gisaid__mutmut_329, + 'x_submit_gisaid__mutmut_330': x_submit_gisaid__mutmut_330, + 'x_submit_gisaid__mutmut_331': x_submit_gisaid__mutmut_331, + 'x_submit_gisaid__mutmut_332': x_submit_gisaid__mutmut_332, + 'x_submit_gisaid__mutmut_333': x_submit_gisaid__mutmut_333, + 'x_submit_gisaid__mutmut_334': x_submit_gisaid__mutmut_334, + 'x_submit_gisaid__mutmut_335': x_submit_gisaid__mutmut_335, + 'x_submit_gisaid__mutmut_336': x_submit_gisaid__mutmut_336, + 'x_submit_gisaid__mutmut_337': x_submit_gisaid__mutmut_337, + 'x_submit_gisaid__mutmut_338': x_submit_gisaid__mutmut_338, + 'x_submit_gisaid__mutmut_339': x_submit_gisaid__mutmut_339, + 'x_submit_gisaid__mutmut_340': x_submit_gisaid__mutmut_340, + 'x_submit_gisaid__mutmut_341': x_submit_gisaid__mutmut_341, + 'x_submit_gisaid__mutmut_342': x_submit_gisaid__mutmut_342, + 'x_submit_gisaid__mutmut_343': x_submit_gisaid__mutmut_343, + 'x_submit_gisaid__mutmut_344': x_submit_gisaid__mutmut_344, + 'x_submit_gisaid__mutmut_345': x_submit_gisaid__mutmut_345, + 'x_submit_gisaid__mutmut_346': x_submit_gisaid__mutmut_346, + 'x_submit_gisaid__mutmut_347': x_submit_gisaid__mutmut_347, + 'x_submit_gisaid__mutmut_348': x_submit_gisaid__mutmut_348, + 'x_submit_gisaid__mutmut_349': x_submit_gisaid__mutmut_349, + 'x_submit_gisaid__mutmut_350': x_submit_gisaid__mutmut_350, + 'x_submit_gisaid__mutmut_351': x_submit_gisaid__mutmut_351, + 'x_submit_gisaid__mutmut_352': x_submit_gisaid__mutmut_352, + 'x_submit_gisaid__mutmut_353': x_submit_gisaid__mutmut_353, + 'x_submit_gisaid__mutmut_354': x_submit_gisaid__mutmut_354, + 'x_submit_gisaid__mutmut_355': x_submit_gisaid__mutmut_355, + 'x_submit_gisaid__mutmut_356': x_submit_gisaid__mutmut_356, + 'x_submit_gisaid__mutmut_357': x_submit_gisaid__mutmut_357, + 'x_submit_gisaid__mutmut_358': x_submit_gisaid__mutmut_358, + 'x_submit_gisaid__mutmut_359': x_submit_gisaid__mutmut_359, + 'x_submit_gisaid__mutmut_360': x_submit_gisaid__mutmut_360, + 'x_submit_gisaid__mutmut_361': x_submit_gisaid__mutmut_361, + 'x_submit_gisaid__mutmut_362': x_submit_gisaid__mutmut_362, + 'x_submit_gisaid__mutmut_363': x_submit_gisaid__mutmut_363, + 'x_submit_gisaid__mutmut_364': x_submit_gisaid__mutmut_364, + 'x_submit_gisaid__mutmut_365': x_submit_gisaid__mutmut_365, + 'x_submit_gisaid__mutmut_366': x_submit_gisaid__mutmut_366, + 'x_submit_gisaid__mutmut_367': x_submit_gisaid__mutmut_367, + 'x_submit_gisaid__mutmut_368': x_submit_gisaid__mutmut_368, + 'x_submit_gisaid__mutmut_369': x_submit_gisaid__mutmut_369, + 'x_submit_gisaid__mutmut_370': x_submit_gisaid__mutmut_370, + 'x_submit_gisaid__mutmut_371': x_submit_gisaid__mutmut_371, + 'x_submit_gisaid__mutmut_372': x_submit_gisaid__mutmut_372, + 'x_submit_gisaid__mutmut_373': x_submit_gisaid__mutmut_373, + 'x_submit_gisaid__mutmut_374': x_submit_gisaid__mutmut_374, + 'x_submit_gisaid__mutmut_375': x_submit_gisaid__mutmut_375, + 'x_submit_gisaid__mutmut_376': x_submit_gisaid__mutmut_376, + 'x_submit_gisaid__mutmut_377': x_submit_gisaid__mutmut_377, + 'x_submit_gisaid__mutmut_378': x_submit_gisaid__mutmut_378, + 'x_submit_gisaid__mutmut_379': x_submit_gisaid__mutmut_379, + 'x_submit_gisaid__mutmut_380': x_submit_gisaid__mutmut_380, + 'x_submit_gisaid__mutmut_381': x_submit_gisaid__mutmut_381, + 'x_submit_gisaid__mutmut_382': x_submit_gisaid__mutmut_382, + 'x_submit_gisaid__mutmut_383': x_submit_gisaid__mutmut_383 +} +x_submit_gisaid__mutmut_orig.__name__ = 'x_submit_gisaid' + +def update_gisaid_files(organism: str, submission_dir: str, submission_status_file: str) -> None: + args = [organism, submission_dir, submission_status_file]# type: ignore + kwargs = {}# type: ignore + return _mutmut_trampoline(x_update_gisaid_files__mutmut_orig, x_update_gisaid_files__mutmut_mutants, args, kwargs, None) + +def x_update_gisaid_files__mutmut_orig(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_1(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = None + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_2(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(None, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_3(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = None, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_4(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = None, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_5(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = None, encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_6(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding=None, index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_7(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=None) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_8(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_9(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_10(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_11(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_12(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_13(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", ) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_14(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 1, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_15(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "XXpythonXX", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_16(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "PYTHON", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_17(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="XXutf-8XX", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_18(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="UTF-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_19(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=True) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_20(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = None + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_21(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(None, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_22(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, None) + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_23(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join("metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_24(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, ) + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_25(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "XXmetadata.csvXX") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_26(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "METADATA.CSV") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_27(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = None + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_28(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(None, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_29(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, None) + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_30(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join("orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_31(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, ) + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_32(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "XXorig_metadata.csvXX") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_33(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "ORIG_METADATA.CSV") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_34(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = None + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_35(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(None, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_36(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, None) + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_37(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join("sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_38(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, ) + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_39(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "XXsequence.fsaXX") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_40(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "SEQUENCE.FSA") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_41(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = None + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_42(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(None, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_43(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, None) + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_44(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join("orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_45(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, ) + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_46(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "XXorig_sequence.fsaXX") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_47(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "ORIG_SEQUENCE.FSA") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_48(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = None + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_49(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains(None, na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_50(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=None)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_51(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains(na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_52(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", )].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_53(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["XXgenbank-statusXX"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_54(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["GENBANK-STATUS"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_55(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("XXprocessed-okXX", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_56(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("PROCESSED-OK", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_57(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=True)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_58(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = None + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_59(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(None, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_60(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = None, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_61(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = None, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_62(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = None, encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_63(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding=None, index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_64(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=None) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_65(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_66(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_67(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_68(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_69(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_70(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", ) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_71(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 1, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_72(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "XXpythonXX", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_73(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "PYTHON", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_74(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="XXutf-8XX", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_75(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="UTF-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_76(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=True) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_77(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "XXFLUXX" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_78(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "flu" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_79(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" not in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_80(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = None + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_81(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "XXIsolate_NameXX" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_82(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "isolate_name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_83(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "ISOLATE_NAME" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_84(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = None + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_85(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "XXgs-segment_nameXX" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_86(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "GS-SEGMENT_NAME" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_87(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = None + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_88(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["XXgs-sample_nameXX", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_89(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["GS-SAMPLE_NAME", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_90(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "XXgs-segment_nameXX"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_91(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "GS-SEGMENT_NAME"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_92(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "XXCOVXX" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_93(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "cov" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_94(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" not in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_95(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = None + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_96(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "XXcovv_virus_nameXX" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_97(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "COVV_VIRUS_NAME" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_98(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = None + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_99(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "XXgs-sample_nameXX" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_100(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "GS-SAMPLE_NAME" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_101(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = None + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_102(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["XXgs-sample_nameXX"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_103(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["GS-SAMPLE_NAME"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_104(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = None + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_105(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() - "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_106(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.upper() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_107(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "XX_virus_nameXX" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_108(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_VIRUS_NAME" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_109(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = None + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_110(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "XXgs-sample_nameXX" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_111(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "GS-SAMPLE_NAME" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_112(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = None + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_113(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["XXgs-sample_nameXX"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_114(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["GS-SAMPLE_NAME"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_115(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = None + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_116(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(None, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_117(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how=None, left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_118(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=None, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_119(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on=None) + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_120(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_121(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_122(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_123(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, ) + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_124(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="XXinnerXX", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_125(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="INNER", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_126(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="XXgs-sample_nameXX") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_127(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="GS-SAMPLE_NAME") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_128(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = None + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_129(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = None + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_130(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=None, errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_131(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors=None) + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_132(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_133(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], ) + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_134(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["XXgs-sample_nameXX", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_135(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["GS-SAMPLE_NAME", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_136(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "XXgs-segment_nameXX"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_137(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "GS-SEGMENT_NAME"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_138(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="XXignoreXX") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_139(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="IGNORE") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_140(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(None, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_141(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = None, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_142(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = None) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_143(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_144(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_145(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, ) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_146(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = False, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_147(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = True) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_148(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = None + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_149(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(None, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_150(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, None) as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_151(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open("r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_152(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, ) as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_153(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "XXrXX") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_154(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "R") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_155(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = None + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_156(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(None, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_157(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, None) + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_158(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse("fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_159(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, ) + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_160(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "XXfastaXX") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_161(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "FASTA") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_162(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id not in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_163(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(None) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_164(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(None, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_165(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, None) as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_166(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open("w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_167(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, ) as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_168(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "XXw+XX") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_169(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "W+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_170(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(None, fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_171(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, None, "fasta") + +def x_update_gisaid_files__mutmut_172(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, None) + +def x_update_gisaid_files__mutmut_173(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_file, "fasta") + +def x_update_gisaid_files__mutmut_174(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, "fasta") + +def x_update_gisaid_files__mutmut_175(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, ) + +def x_update_gisaid_files__mutmut_176(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "XXfastaXX") + +def x_update_gisaid_files__mutmut_177(organism: str, submission_dir: str, submission_status_file: str) -> None: + # Read in the submission status report + status_df = pd.read_csv(submission_status_file, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + # Gather all required files + metadata = os.path.join(submission_dir, "metadata.csv") + orig_metadata = os.path.join(submission_dir, "orig_metadata.csv") + fasta = os.path.join(submission_dir, "sequence.fsa") + orig_fasta = os.path.join(submission_dir, "orig_sequence.fsa") + # Filter out genbank that has accession number + genbank_status_df = status_df[status_df["genbank-status"].str.contains("processed-ok", na=False)].copy() + # Add required gisaid fields + metadata_df = pd.read_csv(metadata, header = 0, dtype = str, engine = "python", encoding="utf-8", index_col=False) + if "FLU" in organism: + metadata_column_name = "Isolate_Name" + fasta_column_name = "gs-segment_name" + gisaid_status_df = genbank_status_df[["gs-sample_name", "gs-segment_name"]] + elif "COV" in organism: + metadata_column_name = "covv_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + else: + metadata_column_name = organism.lower() + "_virus_name" + fasta_column_name = "gs-sample_name" + gisaid_status_df = genbank_status_df[["gs-sample_name"]] + metadata_df = metadata_df.merge(gisaid_status_df, how="inner", left_on=metadata_column_name, right_on="gs-sample_name") + fasta_names = metadata_df[fasta_column_name].tolist() + metadata_df = metadata_df.drop(columns=["gs-sample_name", "gs-segment_name"], errors="ignore") + metadata_df.to_csv(orig_metadata, header = True, index = False) + fasta_dict = [] + with open(orig_fasta, "r") as fsa: + records = SeqIO.parse(fsa, "fasta") + for record in records: + if record.id in fasta_names: + fasta_dict.append(record) + with open(fasta, "w+") as fasta_file: + SeqIO.write(fasta_dict, fasta_file, "FASTA") + +x_update_gisaid_files__mutmut_mutants : ClassVar[MutantDict] = { # type: ignore +'x_update_gisaid_files__mutmut_1': x_update_gisaid_files__mutmut_1, + 'x_update_gisaid_files__mutmut_2': x_update_gisaid_files__mutmut_2, + 'x_update_gisaid_files__mutmut_3': x_update_gisaid_files__mutmut_3, + 'x_update_gisaid_files__mutmut_4': x_update_gisaid_files__mutmut_4, + 'x_update_gisaid_files__mutmut_5': x_update_gisaid_files__mutmut_5, + 'x_update_gisaid_files__mutmut_6': x_update_gisaid_files__mutmut_6, + 'x_update_gisaid_files__mutmut_7': x_update_gisaid_files__mutmut_7, + 'x_update_gisaid_files__mutmut_8': x_update_gisaid_files__mutmut_8, + 'x_update_gisaid_files__mutmut_9': x_update_gisaid_files__mutmut_9, + 'x_update_gisaid_files__mutmut_10': x_update_gisaid_files__mutmut_10, + 'x_update_gisaid_files__mutmut_11': x_update_gisaid_files__mutmut_11, + 'x_update_gisaid_files__mutmut_12': x_update_gisaid_files__mutmut_12, + 'x_update_gisaid_files__mutmut_13': x_update_gisaid_files__mutmut_13, + 'x_update_gisaid_files__mutmut_14': x_update_gisaid_files__mutmut_14, + 'x_update_gisaid_files__mutmut_15': x_update_gisaid_files__mutmut_15, + 'x_update_gisaid_files__mutmut_16': x_update_gisaid_files__mutmut_16, + 'x_update_gisaid_files__mutmut_17': x_update_gisaid_files__mutmut_17, + 'x_update_gisaid_files__mutmut_18': x_update_gisaid_files__mutmut_18, + 'x_update_gisaid_files__mutmut_19': x_update_gisaid_files__mutmut_19, + 'x_update_gisaid_files__mutmut_20': x_update_gisaid_files__mutmut_20, + 'x_update_gisaid_files__mutmut_21': x_update_gisaid_files__mutmut_21, + 'x_update_gisaid_files__mutmut_22': x_update_gisaid_files__mutmut_22, + 'x_update_gisaid_files__mutmut_23': x_update_gisaid_files__mutmut_23, + 'x_update_gisaid_files__mutmut_24': x_update_gisaid_files__mutmut_24, + 'x_update_gisaid_files__mutmut_25': x_update_gisaid_files__mutmut_25, + 'x_update_gisaid_files__mutmut_26': x_update_gisaid_files__mutmut_26, + 'x_update_gisaid_files__mutmut_27': x_update_gisaid_files__mutmut_27, + 'x_update_gisaid_files__mutmut_28': x_update_gisaid_files__mutmut_28, + 'x_update_gisaid_files__mutmut_29': x_update_gisaid_files__mutmut_29, + 'x_update_gisaid_files__mutmut_30': x_update_gisaid_files__mutmut_30, + 'x_update_gisaid_files__mutmut_31': x_update_gisaid_files__mutmut_31, + 'x_update_gisaid_files__mutmut_32': x_update_gisaid_files__mutmut_32, + 'x_update_gisaid_files__mutmut_33': x_update_gisaid_files__mutmut_33, + 'x_update_gisaid_files__mutmut_34': x_update_gisaid_files__mutmut_34, + 'x_update_gisaid_files__mutmut_35': x_update_gisaid_files__mutmut_35, + 'x_update_gisaid_files__mutmut_36': x_update_gisaid_files__mutmut_36, + 'x_update_gisaid_files__mutmut_37': x_update_gisaid_files__mutmut_37, + 'x_update_gisaid_files__mutmut_38': x_update_gisaid_files__mutmut_38, + 'x_update_gisaid_files__mutmut_39': x_update_gisaid_files__mutmut_39, + 'x_update_gisaid_files__mutmut_40': x_update_gisaid_files__mutmut_40, + 'x_update_gisaid_files__mutmut_41': x_update_gisaid_files__mutmut_41, + 'x_update_gisaid_files__mutmut_42': x_update_gisaid_files__mutmut_42, + 'x_update_gisaid_files__mutmut_43': x_update_gisaid_files__mutmut_43, + 'x_update_gisaid_files__mutmut_44': x_update_gisaid_files__mutmut_44, + 'x_update_gisaid_files__mutmut_45': x_update_gisaid_files__mutmut_45, + 'x_update_gisaid_files__mutmut_46': x_update_gisaid_files__mutmut_46, + 'x_update_gisaid_files__mutmut_47': x_update_gisaid_files__mutmut_47, + 'x_update_gisaid_files__mutmut_48': x_update_gisaid_files__mutmut_48, + 'x_update_gisaid_files__mutmut_49': x_update_gisaid_files__mutmut_49, + 'x_update_gisaid_files__mutmut_50': x_update_gisaid_files__mutmut_50, + 'x_update_gisaid_files__mutmut_51': x_update_gisaid_files__mutmut_51, + 'x_update_gisaid_files__mutmut_52': x_update_gisaid_files__mutmut_52, + 'x_update_gisaid_files__mutmut_53': x_update_gisaid_files__mutmut_53, + 'x_update_gisaid_files__mutmut_54': x_update_gisaid_files__mutmut_54, + 'x_update_gisaid_files__mutmut_55': x_update_gisaid_files__mutmut_55, + 'x_update_gisaid_files__mutmut_56': x_update_gisaid_files__mutmut_56, + 'x_update_gisaid_files__mutmut_57': x_update_gisaid_files__mutmut_57, + 'x_update_gisaid_files__mutmut_58': x_update_gisaid_files__mutmut_58, + 'x_update_gisaid_files__mutmut_59': x_update_gisaid_files__mutmut_59, + 'x_update_gisaid_files__mutmut_60': x_update_gisaid_files__mutmut_60, + 'x_update_gisaid_files__mutmut_61': x_update_gisaid_files__mutmut_61, + 'x_update_gisaid_files__mutmut_62': x_update_gisaid_files__mutmut_62, + 'x_update_gisaid_files__mutmut_63': x_update_gisaid_files__mutmut_63, + 'x_update_gisaid_files__mutmut_64': x_update_gisaid_files__mutmut_64, + 'x_update_gisaid_files__mutmut_65': x_update_gisaid_files__mutmut_65, + 'x_update_gisaid_files__mutmut_66': x_update_gisaid_files__mutmut_66, + 'x_update_gisaid_files__mutmut_67': x_update_gisaid_files__mutmut_67, + 'x_update_gisaid_files__mutmut_68': x_update_gisaid_files__mutmut_68, + 'x_update_gisaid_files__mutmut_69': x_update_gisaid_files__mutmut_69, + 'x_update_gisaid_files__mutmut_70': x_update_gisaid_files__mutmut_70, + 'x_update_gisaid_files__mutmut_71': x_update_gisaid_files__mutmut_71, + 'x_update_gisaid_files__mutmut_72': x_update_gisaid_files__mutmut_72, + 'x_update_gisaid_files__mutmut_73': x_update_gisaid_files__mutmut_73, + 'x_update_gisaid_files__mutmut_74': x_update_gisaid_files__mutmut_74, + 'x_update_gisaid_files__mutmut_75': x_update_gisaid_files__mutmut_75, + 'x_update_gisaid_files__mutmut_76': x_update_gisaid_files__mutmut_76, + 'x_update_gisaid_files__mutmut_77': x_update_gisaid_files__mutmut_77, + 'x_update_gisaid_files__mutmut_78': x_update_gisaid_files__mutmut_78, + 'x_update_gisaid_files__mutmut_79': x_update_gisaid_files__mutmut_79, + 'x_update_gisaid_files__mutmut_80': x_update_gisaid_files__mutmut_80, + 'x_update_gisaid_files__mutmut_81': x_update_gisaid_files__mutmut_81, + 'x_update_gisaid_files__mutmut_82': x_update_gisaid_files__mutmut_82, + 'x_update_gisaid_files__mutmut_83': x_update_gisaid_files__mutmut_83, + 'x_update_gisaid_files__mutmut_84': x_update_gisaid_files__mutmut_84, + 'x_update_gisaid_files__mutmut_85': x_update_gisaid_files__mutmut_85, + 'x_update_gisaid_files__mutmut_86': x_update_gisaid_files__mutmut_86, + 'x_update_gisaid_files__mutmut_87': x_update_gisaid_files__mutmut_87, + 'x_update_gisaid_files__mutmut_88': x_update_gisaid_files__mutmut_88, + 'x_update_gisaid_files__mutmut_89': x_update_gisaid_files__mutmut_89, + 'x_update_gisaid_files__mutmut_90': x_update_gisaid_files__mutmut_90, + 'x_update_gisaid_files__mutmut_91': x_update_gisaid_files__mutmut_91, + 'x_update_gisaid_files__mutmut_92': x_update_gisaid_files__mutmut_92, + 'x_update_gisaid_files__mutmut_93': x_update_gisaid_files__mutmut_93, + 'x_update_gisaid_files__mutmut_94': x_update_gisaid_files__mutmut_94, + 'x_update_gisaid_files__mutmut_95': x_update_gisaid_files__mutmut_95, + 'x_update_gisaid_files__mutmut_96': x_update_gisaid_files__mutmut_96, + 'x_update_gisaid_files__mutmut_97': x_update_gisaid_files__mutmut_97, + 'x_update_gisaid_files__mutmut_98': x_update_gisaid_files__mutmut_98, + 'x_update_gisaid_files__mutmut_99': x_update_gisaid_files__mutmut_99, + 'x_update_gisaid_files__mutmut_100': x_update_gisaid_files__mutmut_100, + 'x_update_gisaid_files__mutmut_101': x_update_gisaid_files__mutmut_101, + 'x_update_gisaid_files__mutmut_102': x_update_gisaid_files__mutmut_102, + 'x_update_gisaid_files__mutmut_103': x_update_gisaid_files__mutmut_103, + 'x_update_gisaid_files__mutmut_104': x_update_gisaid_files__mutmut_104, + 'x_update_gisaid_files__mutmut_105': x_update_gisaid_files__mutmut_105, + 'x_update_gisaid_files__mutmut_106': x_update_gisaid_files__mutmut_106, + 'x_update_gisaid_files__mutmut_107': x_update_gisaid_files__mutmut_107, + 'x_update_gisaid_files__mutmut_108': x_update_gisaid_files__mutmut_108, + 'x_update_gisaid_files__mutmut_109': x_update_gisaid_files__mutmut_109, + 'x_update_gisaid_files__mutmut_110': x_update_gisaid_files__mutmut_110, + 'x_update_gisaid_files__mutmut_111': x_update_gisaid_files__mutmut_111, + 'x_update_gisaid_files__mutmut_112': x_update_gisaid_files__mutmut_112, + 'x_update_gisaid_files__mutmut_113': x_update_gisaid_files__mutmut_113, + 'x_update_gisaid_files__mutmut_114': x_update_gisaid_files__mutmut_114, + 'x_update_gisaid_files__mutmut_115': x_update_gisaid_files__mutmut_115, + 'x_update_gisaid_files__mutmut_116': x_update_gisaid_files__mutmut_116, + 'x_update_gisaid_files__mutmut_117': x_update_gisaid_files__mutmut_117, + 'x_update_gisaid_files__mutmut_118': x_update_gisaid_files__mutmut_118, + 'x_update_gisaid_files__mutmut_119': x_update_gisaid_files__mutmut_119, + 'x_update_gisaid_files__mutmut_120': x_update_gisaid_files__mutmut_120, + 'x_update_gisaid_files__mutmut_121': x_update_gisaid_files__mutmut_121, + 'x_update_gisaid_files__mutmut_122': x_update_gisaid_files__mutmut_122, + 'x_update_gisaid_files__mutmut_123': x_update_gisaid_files__mutmut_123, + 'x_update_gisaid_files__mutmut_124': x_update_gisaid_files__mutmut_124, + 'x_update_gisaid_files__mutmut_125': x_update_gisaid_files__mutmut_125, + 'x_update_gisaid_files__mutmut_126': x_update_gisaid_files__mutmut_126, + 'x_update_gisaid_files__mutmut_127': x_update_gisaid_files__mutmut_127, + 'x_update_gisaid_files__mutmut_128': x_update_gisaid_files__mutmut_128, + 'x_update_gisaid_files__mutmut_129': x_update_gisaid_files__mutmut_129, + 'x_update_gisaid_files__mutmut_130': x_update_gisaid_files__mutmut_130, + 'x_update_gisaid_files__mutmut_131': x_update_gisaid_files__mutmut_131, + 'x_update_gisaid_files__mutmut_132': x_update_gisaid_files__mutmut_132, + 'x_update_gisaid_files__mutmut_133': x_update_gisaid_files__mutmut_133, + 'x_update_gisaid_files__mutmut_134': x_update_gisaid_files__mutmut_134, + 'x_update_gisaid_files__mutmut_135': x_update_gisaid_files__mutmut_135, + 'x_update_gisaid_files__mutmut_136': x_update_gisaid_files__mutmut_136, + 'x_update_gisaid_files__mutmut_137': x_update_gisaid_files__mutmut_137, + 'x_update_gisaid_files__mutmut_138': x_update_gisaid_files__mutmut_138, + 'x_update_gisaid_files__mutmut_139': x_update_gisaid_files__mutmut_139, + 'x_update_gisaid_files__mutmut_140': x_update_gisaid_files__mutmut_140, + 'x_update_gisaid_files__mutmut_141': x_update_gisaid_files__mutmut_141, + 'x_update_gisaid_files__mutmut_142': x_update_gisaid_files__mutmut_142, + 'x_update_gisaid_files__mutmut_143': x_update_gisaid_files__mutmut_143, + 'x_update_gisaid_files__mutmut_144': x_update_gisaid_files__mutmut_144, + 'x_update_gisaid_files__mutmut_145': x_update_gisaid_files__mutmut_145, + 'x_update_gisaid_files__mutmut_146': x_update_gisaid_files__mutmut_146, + 'x_update_gisaid_files__mutmut_147': x_update_gisaid_files__mutmut_147, + 'x_update_gisaid_files__mutmut_148': x_update_gisaid_files__mutmut_148, + 'x_update_gisaid_files__mutmut_149': x_update_gisaid_files__mutmut_149, + 'x_update_gisaid_files__mutmut_150': x_update_gisaid_files__mutmut_150, + 'x_update_gisaid_files__mutmut_151': x_update_gisaid_files__mutmut_151, + 'x_update_gisaid_files__mutmut_152': x_update_gisaid_files__mutmut_152, + 'x_update_gisaid_files__mutmut_153': x_update_gisaid_files__mutmut_153, + 'x_update_gisaid_files__mutmut_154': x_update_gisaid_files__mutmut_154, + 'x_update_gisaid_files__mutmut_155': x_update_gisaid_files__mutmut_155, + 'x_update_gisaid_files__mutmut_156': x_update_gisaid_files__mutmut_156, + 'x_update_gisaid_files__mutmut_157': x_update_gisaid_files__mutmut_157, + 'x_update_gisaid_files__mutmut_158': x_update_gisaid_files__mutmut_158, + 'x_update_gisaid_files__mutmut_159': x_update_gisaid_files__mutmut_159, + 'x_update_gisaid_files__mutmut_160': x_update_gisaid_files__mutmut_160, + 'x_update_gisaid_files__mutmut_161': x_update_gisaid_files__mutmut_161, + 'x_update_gisaid_files__mutmut_162': x_update_gisaid_files__mutmut_162, + 'x_update_gisaid_files__mutmut_163': x_update_gisaid_files__mutmut_163, + 'x_update_gisaid_files__mutmut_164': x_update_gisaid_files__mutmut_164, + 'x_update_gisaid_files__mutmut_165': x_update_gisaid_files__mutmut_165, + 'x_update_gisaid_files__mutmut_166': x_update_gisaid_files__mutmut_166, + 'x_update_gisaid_files__mutmut_167': x_update_gisaid_files__mutmut_167, + 'x_update_gisaid_files__mutmut_168': x_update_gisaid_files__mutmut_168, + 'x_update_gisaid_files__mutmut_169': x_update_gisaid_files__mutmut_169, + 'x_update_gisaid_files__mutmut_170': x_update_gisaid_files__mutmut_170, + 'x_update_gisaid_files__mutmut_171': x_update_gisaid_files__mutmut_171, + 'x_update_gisaid_files__mutmut_172': x_update_gisaid_files__mutmut_172, + 'x_update_gisaid_files__mutmut_173': x_update_gisaid_files__mutmut_173, + 'x_update_gisaid_files__mutmut_174': x_update_gisaid_files__mutmut_174, + 'x_update_gisaid_files__mutmut_175': x_update_gisaid_files__mutmut_175, + 'x_update_gisaid_files__mutmut_176': x_update_gisaid_files__mutmut_176, + 'x_update_gisaid_files__mutmut_177': x_update_gisaid_files__mutmut_177 +} +x_update_gisaid_files__mutmut_orig.__name__ = 'x_update_gisaid_files' diff --git a/mutants/src/gisaid_handler.py.meta b/mutants/src/gisaid_handler.py.meta new file mode 100644 index 0000000..464d823 --- /dev/null +++ b/mutants/src/gisaid_handler.py.meta @@ -0,0 +1,3109 @@ +{ + "exit_code_by_key": { + "gisaid_handler.x_create_gisaid_files__mutmut_1": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_2": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_3": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_4": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_5": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_6": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_7": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_8": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_9": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_10": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_11": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_12": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_13": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_14": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_15": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_16": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_17": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_18": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_19": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_20": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_21": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_22": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_23": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_24": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_25": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_26": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_27": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_28": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_29": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_30": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_31": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_32": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_33": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_34": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_35": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_36": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_37": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_38": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_39": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_40": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_41": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_42": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_43": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_44": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_45": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_46": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_47": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_48": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_49": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_50": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_51": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_52": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_53": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_54": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_55": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_56": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_57": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_58": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_59": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_60": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_61": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_62": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_63": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_64": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_65": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_66": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_67": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_68": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_69": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_70": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_71": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_72": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_73": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_74": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_75": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_76": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_77": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_78": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_79": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_80": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_81": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_82": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_83": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_84": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_85": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_86": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_87": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_88": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_89": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_90": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_91": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_92": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_93": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_94": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_95": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_96": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_97": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_98": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_99": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_100": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_101": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_102": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_103": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_104": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_105": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_106": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_107": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_108": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_109": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_110": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_111": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_112": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_113": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_114": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_115": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_116": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_117": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_118": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_119": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_120": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_121": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_122": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_123": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_124": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_125": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_126": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_127": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_128": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_129": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_130": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_131": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_132": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_133": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_134": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_135": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_136": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_137": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_138": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_139": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_140": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_141": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_142": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_143": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_144": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_145": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_146": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_147": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_148": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_149": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_150": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_151": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_152": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_153": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_154": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_155": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_156": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_157": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_158": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_159": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_160": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_161": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_162": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_163": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_164": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_165": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_166": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_167": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_168": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_169": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_170": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_171": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_172": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_173": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_174": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_175": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_176": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_177": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_178": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_179": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_180": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_181": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_182": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_183": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_184": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_185": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_186": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_187": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_188": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_189": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_190": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_191": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_192": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_193": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_194": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_195": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_196": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_197": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_198": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_199": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_200": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_201": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_202": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_203": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_204": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_205": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_206": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_207": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_208": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_209": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_210": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_211": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_212": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_213": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_214": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_215": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_216": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_217": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_218": 37, + "gisaid_handler.x_create_gisaid_files__mutmut_219": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_220": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_221": 1, + "gisaid_handler.x_create_gisaid_files__mutmut_222": 1, + "gisaid_handler.x_process_flu_dates__mutmut_1": 37, + "gisaid_handler.x_process_flu_dates__mutmut_2": 1, + "gisaid_handler.x_process_flu_dates__mutmut_3": 1, + "gisaid_handler.x_process_flu_dates__mutmut_4": 1, + "gisaid_handler.x_process_flu_dates__mutmut_5": 1, + "gisaid_handler.x_process_flu_dates__mutmut_6": 1, + "gisaid_handler.x_process_flu_dates__mutmut_7": 1, + "gisaid_handler.x_process_flu_dates__mutmut_8": 1, + "gisaid_handler.x_process_flu_dates__mutmut_9": 1, + "gisaid_handler.x_process_flu_dates__mutmut_10": 1, + "gisaid_handler.x_process_flu_dates__mutmut_11": 1, + "gisaid_handler.x_process_flu_dates__mutmut_12": 1, + "gisaid_handler.x_process_flu_dates__mutmut_13": 1, + "gisaid_handler.x_process_flu_dates__mutmut_14": 1, + "gisaid_handler.x_process_flu_dates__mutmut_15": 1, + "gisaid_handler.x_process_flu_dates__mutmut_16": 1, + "gisaid_handler.x_process_flu_dates__mutmut_17": 1, + "gisaid_handler.x_process_flu_dates__mutmut_18": 1, + "gisaid_handler.x_process_flu_dates__mutmut_19": 1, + "gisaid_handler.x_process_flu_dates__mutmut_20": 1, + "gisaid_handler.x_process_flu_dates__mutmut_21": 1, + "gisaid_handler.x_process_flu_dates__mutmut_22": 1, + "gisaid_handler.x_process_flu_dates__mutmut_23": 1, + "gisaid_handler.x_process_flu_dates__mutmut_24": 1, + "gisaid_handler.x_process_flu_dates__mutmut_25": 1, + "gisaid_handler.x_process_flu_dates__mutmut_26": 1, + "gisaid_handler.x_process_flu_dates__mutmut_27": 1, + "gisaid_handler.x_process_flu_dates__mutmut_28": 1, + "gisaid_handler.x_process_flu_dates__mutmut_29": 1, + "gisaid_handler.x_process_flu_dates__mutmut_30": 1, + "gisaid_handler.x_process_flu_dates__mutmut_31": 1, + "gisaid_handler.x_process_flu_dates__mutmut_32": 1, + "gisaid_handler.x_process_flu_dates__mutmut_33": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_1": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_2": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_3": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_4": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_5": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_6": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_7": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_8": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_9": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_10": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_11": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_12": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_13": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_14": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_15": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_16": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_17": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_18": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_19": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_20": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_21": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_22": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_23": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_24": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_25": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_26": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_27": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_28": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_29": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_30": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_31": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_32": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_33": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_34": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_35": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_36": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_37": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_38": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_39": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_40": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_41": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_42": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_43": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_44": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_45": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_46": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_47": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_48": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_49": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_50": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_51": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_52": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_53": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_54": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_55": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_56": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_57": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_58": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_59": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_60": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_61": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_62": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_63": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_64": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_65": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_66": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_67": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_68": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_69": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_70": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_71": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_72": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_73": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_74": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_75": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_76": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_77": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_78": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_79": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_80": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_81": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_82": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_83": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_84": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_85": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_86": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_87": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_88": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_89": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_90": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_91": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_92": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_93": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_94": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_95": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_96": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_97": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_98": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_99": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_100": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_101": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_102": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_103": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_104": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_105": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_106": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_107": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_108": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_109": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_110": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_111": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_112": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_113": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_114": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_115": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_116": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_117": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_118": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_119": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_120": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_121": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_122": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_123": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_124": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_125": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_126": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_127": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_128": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_129": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_130": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_131": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_132": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_133": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_134": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_135": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_136": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_137": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_138": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_139": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_140": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_141": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_142": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_143": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_144": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_145": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_146": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_147": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_148": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_149": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_150": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_151": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_152": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_153": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_154": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_155": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_156": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_157": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_158": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_159": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_160": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_161": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_162": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_163": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_164": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_165": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_166": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_167": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_168": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_169": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_170": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_171": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_172": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_173": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_174": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_175": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_176": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_177": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_178": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_179": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_180": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_181": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_182": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_183": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_184": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_185": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_186": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_187": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_188": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_189": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_190": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_191": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_192": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_193": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_194": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_195": -24, + "gisaid_handler.x_process_gisaid_log__mutmut_196": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_197": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_198": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_199": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_200": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_201": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_202": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_203": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_204": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_205": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_206": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_207": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_208": 37, + "gisaid_handler.x_process_gisaid_log__mutmut_209": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_210": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_211": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_212": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_213": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_214": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_215": 0, + "gisaid_handler.x_process_gisaid_log__mutmut_216": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_217": 1, + "gisaid_handler.x_process_gisaid_log__mutmut_218": 1, + "gisaid_handler.x_submit_gisaid__mutmut_1": 37, + "gisaid_handler.x_submit_gisaid__mutmut_2": 37, + "gisaid_handler.x_submit_gisaid__mutmut_3": 37, + "gisaid_handler.x_submit_gisaid__mutmut_4": 1, + "gisaid_handler.x_submit_gisaid__mutmut_5": 1, + "gisaid_handler.x_submit_gisaid__mutmut_6": 1, + "gisaid_handler.x_submit_gisaid__mutmut_7": 1, + "gisaid_handler.x_submit_gisaid__mutmut_8": 37, + "gisaid_handler.x_submit_gisaid__mutmut_9": 37, + "gisaid_handler.x_submit_gisaid__mutmut_10": 37, + "gisaid_handler.x_submit_gisaid__mutmut_11": 1, + "gisaid_handler.x_submit_gisaid__mutmut_12": 1, + "gisaid_handler.x_submit_gisaid__mutmut_13": 1, + "gisaid_handler.x_submit_gisaid__mutmut_14": 1, + "gisaid_handler.x_submit_gisaid__mutmut_15": 37, + "gisaid_handler.x_submit_gisaid__mutmut_16": 37, + "gisaid_handler.x_submit_gisaid__mutmut_17": 37, + "gisaid_handler.x_submit_gisaid__mutmut_18": 1, + "gisaid_handler.x_submit_gisaid__mutmut_19": 1, + "gisaid_handler.x_submit_gisaid__mutmut_20": 1, + "gisaid_handler.x_submit_gisaid__mutmut_21": 1, + "gisaid_handler.x_submit_gisaid__mutmut_22": 37, + "gisaid_handler.x_submit_gisaid__mutmut_23": 37, + "gisaid_handler.x_submit_gisaid__mutmut_24": 37, + "gisaid_handler.x_submit_gisaid__mutmut_25": 1, + "gisaid_handler.x_submit_gisaid__mutmut_26": 1, + "gisaid_handler.x_submit_gisaid__mutmut_27": 1, + "gisaid_handler.x_submit_gisaid__mutmut_28": 1, + "gisaid_handler.x_submit_gisaid__mutmut_29": 37, + "gisaid_handler.x_submit_gisaid__mutmut_30": 37, + "gisaid_handler.x_submit_gisaid__mutmut_31": 37, + "gisaid_handler.x_submit_gisaid__mutmut_32": 1, + "gisaid_handler.x_submit_gisaid__mutmut_33": 1, + "gisaid_handler.x_submit_gisaid__mutmut_34": 37, + "gisaid_handler.x_submit_gisaid__mutmut_35": 1, + "gisaid_handler.x_submit_gisaid__mutmut_36": 1, + "gisaid_handler.x_submit_gisaid__mutmut_37": 37, + "gisaid_handler.x_submit_gisaid__mutmut_38": 37, + "gisaid_handler.x_submit_gisaid__mutmut_39": 37, + "gisaid_handler.x_submit_gisaid__mutmut_40": 37, + "gisaid_handler.x_submit_gisaid__mutmut_41": 1, + "gisaid_handler.x_submit_gisaid__mutmut_42": 1, + "gisaid_handler.x_submit_gisaid__mutmut_43": 37, + "gisaid_handler.x_submit_gisaid__mutmut_44": 37, + "gisaid_handler.x_submit_gisaid__mutmut_45": 37, + "gisaid_handler.x_submit_gisaid__mutmut_46": 37, + "gisaid_handler.x_submit_gisaid__mutmut_47": 37, + "gisaid_handler.x_submit_gisaid__mutmut_48": 37, + "gisaid_handler.x_submit_gisaid__mutmut_49": 37, + "gisaid_handler.x_submit_gisaid__mutmut_50": 1, + "gisaid_handler.x_submit_gisaid__mutmut_51": 37, + "gisaid_handler.x_submit_gisaid__mutmut_52": 1, + "gisaid_handler.x_submit_gisaid__mutmut_53": 37, + "gisaid_handler.x_submit_gisaid__mutmut_54": 1, + "gisaid_handler.x_submit_gisaid__mutmut_55": 1, + "gisaid_handler.x_submit_gisaid__mutmut_56": 1, + "gisaid_handler.x_submit_gisaid__mutmut_57": -24, + "gisaid_handler.x_submit_gisaid__mutmut_58": 1, + "gisaid_handler.x_submit_gisaid__mutmut_59": 1, + "gisaid_handler.x_submit_gisaid__mutmut_60": 1, + "gisaid_handler.x_submit_gisaid__mutmut_61": 37, + "gisaid_handler.x_submit_gisaid__mutmut_62": 37, + "gisaid_handler.x_submit_gisaid__mutmut_63": 1, + "gisaid_handler.x_submit_gisaid__mutmut_64": 1, + "gisaid_handler.x_submit_gisaid__mutmut_65": 1, + "gisaid_handler.x_submit_gisaid__mutmut_66": 1, + "gisaid_handler.x_submit_gisaid__mutmut_67": 1, + "gisaid_handler.x_submit_gisaid__mutmut_68": 37, + "gisaid_handler.x_submit_gisaid__mutmut_69": 37, + "gisaid_handler.x_submit_gisaid__mutmut_70": 37, + "gisaid_handler.x_submit_gisaid__mutmut_71": 1, + "gisaid_handler.x_submit_gisaid__mutmut_72": 1, + "gisaid_handler.x_submit_gisaid__mutmut_73": 37, + "gisaid_handler.x_submit_gisaid__mutmut_74": 37, + "gisaid_handler.x_submit_gisaid__mutmut_75": 1, + "gisaid_handler.x_submit_gisaid__mutmut_76": 1, + "gisaid_handler.x_submit_gisaid__mutmut_77": 1, + "gisaid_handler.x_submit_gisaid__mutmut_78": 1, + "gisaid_handler.x_submit_gisaid__mutmut_79": 1, + "gisaid_handler.x_submit_gisaid__mutmut_80": 37, + "gisaid_handler.x_submit_gisaid__mutmut_81": 1, + "gisaid_handler.x_submit_gisaid__mutmut_82": 1, + "gisaid_handler.x_submit_gisaid__mutmut_83": 37, + "gisaid_handler.x_submit_gisaid__mutmut_84": 37, + "gisaid_handler.x_submit_gisaid__mutmut_85": 37, + "gisaid_handler.x_submit_gisaid__mutmut_86": 1, + "gisaid_handler.x_submit_gisaid__mutmut_87": 1, + "gisaid_handler.x_submit_gisaid__mutmut_88": 1, + "gisaid_handler.x_submit_gisaid__mutmut_89": 37, + "gisaid_handler.x_submit_gisaid__mutmut_90": 1, + "gisaid_handler.x_submit_gisaid__mutmut_91": 1, + "gisaid_handler.x_submit_gisaid__mutmut_92": 1, + "gisaid_handler.x_submit_gisaid__mutmut_93": 1, + "gisaid_handler.x_submit_gisaid__mutmut_94": 1, + "gisaid_handler.x_submit_gisaid__mutmut_95": 1, + "gisaid_handler.x_submit_gisaid__mutmut_96": 1, + "gisaid_handler.x_submit_gisaid__mutmut_97": 1, + "gisaid_handler.x_submit_gisaid__mutmut_98": 1, + "gisaid_handler.x_submit_gisaid__mutmut_99": 1, + "gisaid_handler.x_submit_gisaid__mutmut_100": 1, + "gisaid_handler.x_submit_gisaid__mutmut_101": 1, + "gisaid_handler.x_submit_gisaid__mutmut_102": 1, + "gisaid_handler.x_submit_gisaid__mutmut_103": 1, + "gisaid_handler.x_submit_gisaid__mutmut_104": 1, + "gisaid_handler.x_submit_gisaid__mutmut_105": 1, + "gisaid_handler.x_submit_gisaid__mutmut_106": 1, + "gisaid_handler.x_submit_gisaid__mutmut_107": 1, + "gisaid_handler.x_submit_gisaid__mutmut_108": 1, + "gisaid_handler.x_submit_gisaid__mutmut_109": 1, + "gisaid_handler.x_submit_gisaid__mutmut_110": 1, + "gisaid_handler.x_submit_gisaid__mutmut_111": 1, + "gisaid_handler.x_submit_gisaid__mutmut_112": 1, + "gisaid_handler.x_submit_gisaid__mutmut_113": 1, + "gisaid_handler.x_submit_gisaid__mutmut_114": 1, + "gisaid_handler.x_submit_gisaid__mutmut_115": 1, + "gisaid_handler.x_submit_gisaid__mutmut_116": 1, + "gisaid_handler.x_submit_gisaid__mutmut_117": 1, + "gisaid_handler.x_submit_gisaid__mutmut_118": -24, + "gisaid_handler.x_submit_gisaid__mutmut_119": -24, + "gisaid_handler.x_submit_gisaid__mutmut_120": 1, + "gisaid_handler.x_submit_gisaid__mutmut_121": 1, + "gisaid_handler.x_submit_gisaid__mutmut_122": 1, + "gisaid_handler.x_submit_gisaid__mutmut_123": 1, + "gisaid_handler.x_submit_gisaid__mutmut_124": 1, + "gisaid_handler.x_submit_gisaid__mutmut_125": 1, + "gisaid_handler.x_submit_gisaid__mutmut_126": 1, + "gisaid_handler.x_submit_gisaid__mutmut_127": 1, + "gisaid_handler.x_submit_gisaid__mutmut_128": 1, + "gisaid_handler.x_submit_gisaid__mutmut_129": 1, + "gisaid_handler.x_submit_gisaid__mutmut_130": 1, + "gisaid_handler.x_submit_gisaid__mutmut_131": -24, + "gisaid_handler.x_submit_gisaid__mutmut_132": 37, + "gisaid_handler.x_submit_gisaid__mutmut_133": 37, + "gisaid_handler.x_submit_gisaid__mutmut_134": 0, + "gisaid_handler.x_submit_gisaid__mutmut_135": 37, + "gisaid_handler.x_submit_gisaid__mutmut_136": 37, + "gisaid_handler.x_submit_gisaid__mutmut_137": 37, + "gisaid_handler.x_submit_gisaid__mutmut_138": 37, + "gisaid_handler.x_submit_gisaid__mutmut_139": 37, + "gisaid_handler.x_submit_gisaid__mutmut_140": 37, + "gisaid_handler.x_submit_gisaid__mutmut_141": 1, + "gisaid_handler.x_submit_gisaid__mutmut_142": 1, + "gisaid_handler.x_submit_gisaid__mutmut_143": 1, + "gisaid_handler.x_submit_gisaid__mutmut_144": 1, + "gisaid_handler.x_submit_gisaid__mutmut_145": 1, + "gisaid_handler.x_submit_gisaid__mutmut_146": 37, + "gisaid_handler.x_submit_gisaid__mutmut_147": 1, + "gisaid_handler.x_submit_gisaid__mutmut_148": 1, + "gisaid_handler.x_submit_gisaid__mutmut_149": 1, + "gisaid_handler.x_submit_gisaid__mutmut_150": 1, + "gisaid_handler.x_submit_gisaid__mutmut_151": 1, + "gisaid_handler.x_submit_gisaid__mutmut_152": 1, + "gisaid_handler.x_submit_gisaid__mutmut_153": 37, + "gisaid_handler.x_submit_gisaid__mutmut_154": 37, + "gisaid_handler.x_submit_gisaid__mutmut_155": 1, + "gisaid_handler.x_submit_gisaid__mutmut_156": 1, + "gisaid_handler.x_submit_gisaid__mutmut_157": 1, + "gisaid_handler.x_submit_gisaid__mutmut_158": 37, + "gisaid_handler.x_submit_gisaid__mutmut_159": 37, + "gisaid_handler.x_submit_gisaid__mutmut_160": 37, + "gisaid_handler.x_submit_gisaid__mutmut_161": 1, + "gisaid_handler.x_submit_gisaid__mutmut_162": 1, + "gisaid_handler.x_submit_gisaid__mutmut_163": 1, + "gisaid_handler.x_submit_gisaid__mutmut_164": 1, + "gisaid_handler.x_submit_gisaid__mutmut_165": 37, + "gisaid_handler.x_submit_gisaid__mutmut_166": 37, + "gisaid_handler.x_submit_gisaid__mutmut_167": 37, + "gisaid_handler.x_submit_gisaid__mutmut_168": 1, + "gisaid_handler.x_submit_gisaid__mutmut_169": 1, + "gisaid_handler.x_submit_gisaid__mutmut_170": 1, + "gisaid_handler.x_submit_gisaid__mutmut_171": 1, + "gisaid_handler.x_submit_gisaid__mutmut_172": 1, + "gisaid_handler.x_submit_gisaid__mutmut_173": 1, + "gisaid_handler.x_submit_gisaid__mutmut_174": 1, + "gisaid_handler.x_submit_gisaid__mutmut_175": 1, + "gisaid_handler.x_submit_gisaid__mutmut_176": 1, + "gisaid_handler.x_submit_gisaid__mutmut_177": 1, + "gisaid_handler.x_submit_gisaid__mutmut_178": 1, + "gisaid_handler.x_submit_gisaid__mutmut_179": 1, + "gisaid_handler.x_submit_gisaid__mutmut_180": 1, + "gisaid_handler.x_submit_gisaid__mutmut_181": 1, + "gisaid_handler.x_submit_gisaid__mutmut_182": 37, + "gisaid_handler.x_submit_gisaid__mutmut_183": 0, + "gisaid_handler.x_submit_gisaid__mutmut_184": 1, + "gisaid_handler.x_submit_gisaid__mutmut_185": 37, + "gisaid_handler.x_submit_gisaid__mutmut_186": 1, + "gisaid_handler.x_submit_gisaid__mutmut_187": 37, + "gisaid_handler.x_submit_gisaid__mutmut_188": 1, + "gisaid_handler.x_submit_gisaid__mutmut_189": 1, + "gisaid_handler.x_submit_gisaid__mutmut_190": 1, + "gisaid_handler.x_submit_gisaid__mutmut_191": 0, + "gisaid_handler.x_submit_gisaid__mutmut_192": 0, + "gisaid_handler.x_submit_gisaid__mutmut_193": 1, + "gisaid_handler.x_submit_gisaid__mutmut_194": 1, + "gisaid_handler.x_submit_gisaid__mutmut_195": 37, + "gisaid_handler.x_submit_gisaid__mutmut_196": 1, + "gisaid_handler.x_submit_gisaid__mutmut_197": 37, + "gisaid_handler.x_submit_gisaid__mutmut_198": 1, + "gisaid_handler.x_submit_gisaid__mutmut_199": 1, + "gisaid_handler.x_submit_gisaid__mutmut_200": 1, + "gisaid_handler.x_submit_gisaid__mutmut_201": 0, + "gisaid_handler.x_submit_gisaid__mutmut_202": 0, + "gisaid_handler.x_submit_gisaid__mutmut_203": 1, + "gisaid_handler.x_submit_gisaid__mutmut_204": 37, + "gisaid_handler.x_submit_gisaid__mutmut_205": 1, + "gisaid_handler.x_submit_gisaid__mutmut_206": 1, + "gisaid_handler.x_submit_gisaid__mutmut_207": 1, + "gisaid_handler.x_submit_gisaid__mutmut_208": 1, + "gisaid_handler.x_submit_gisaid__mutmut_209": 1, + "gisaid_handler.x_submit_gisaid__mutmut_210": 1, + "gisaid_handler.x_submit_gisaid__mutmut_211": 1, + "gisaid_handler.x_submit_gisaid__mutmut_212": 1, + "gisaid_handler.x_submit_gisaid__mutmut_213": 1, + "gisaid_handler.x_submit_gisaid__mutmut_214": 1, + "gisaid_handler.x_submit_gisaid__mutmut_215": 1, + "gisaid_handler.x_submit_gisaid__mutmut_216": 1, + "gisaid_handler.x_submit_gisaid__mutmut_217": 1, + "gisaid_handler.x_submit_gisaid__mutmut_218": 37, + "gisaid_handler.x_submit_gisaid__mutmut_219": 1, + "gisaid_handler.x_submit_gisaid__mutmut_220": 37, + "gisaid_handler.x_submit_gisaid__mutmut_221": 1, + "gisaid_handler.x_submit_gisaid__mutmut_222": 37, + "gisaid_handler.x_submit_gisaid__mutmut_223": 1, + "gisaid_handler.x_submit_gisaid__mutmut_224": 1, + "gisaid_handler.x_submit_gisaid__mutmut_225": 1, + "gisaid_handler.x_submit_gisaid__mutmut_226": 1, + "gisaid_handler.x_submit_gisaid__mutmut_227": 1, + "gisaid_handler.x_submit_gisaid__mutmut_228": 1, + "gisaid_handler.x_submit_gisaid__mutmut_229": 1, + "gisaid_handler.x_submit_gisaid__mutmut_230": 1, + "gisaid_handler.x_submit_gisaid__mutmut_231": 1, + "gisaid_handler.x_submit_gisaid__mutmut_232": 1, + "gisaid_handler.x_submit_gisaid__mutmut_233": 37, + "gisaid_handler.x_submit_gisaid__mutmut_234": 1, + "gisaid_handler.x_submit_gisaid__mutmut_235": 1, + "gisaid_handler.x_submit_gisaid__mutmut_236": 1, + "gisaid_handler.x_submit_gisaid__mutmut_237": 1, + "gisaid_handler.x_submit_gisaid__mutmut_238": 1, + "gisaid_handler.x_submit_gisaid__mutmut_239": 1, + "gisaid_handler.x_submit_gisaid__mutmut_240": 37, + "gisaid_handler.x_submit_gisaid__mutmut_241": 1, + "gisaid_handler.x_submit_gisaid__mutmut_242": 37, + "gisaid_handler.x_submit_gisaid__mutmut_243": 1, + "gisaid_handler.x_submit_gisaid__mutmut_244": 37, + "gisaid_handler.x_submit_gisaid__mutmut_245": 1, + "gisaid_handler.x_submit_gisaid__mutmut_246": 1, + "gisaid_handler.x_submit_gisaid__mutmut_247": 1, + "gisaid_handler.x_submit_gisaid__mutmut_248": 1, + "gisaid_handler.x_submit_gisaid__mutmut_249": 1, + "gisaid_handler.x_submit_gisaid__mutmut_250": 1, + "gisaid_handler.x_submit_gisaid__mutmut_251": 1, + "gisaid_handler.x_submit_gisaid__mutmut_252": 1, + "gisaid_handler.x_submit_gisaid__mutmut_253": 1, + "gisaid_handler.x_submit_gisaid__mutmut_254": 37, + "gisaid_handler.x_submit_gisaid__mutmut_255": 37, + "gisaid_handler.x_submit_gisaid__mutmut_256": 1, + "gisaid_handler.x_submit_gisaid__mutmut_257": 1, + "gisaid_handler.x_submit_gisaid__mutmut_258": 1, + "gisaid_handler.x_submit_gisaid__mutmut_259": 1, + "gisaid_handler.x_submit_gisaid__mutmut_260": 1, + "gisaid_handler.x_submit_gisaid__mutmut_261": 37, + "gisaid_handler.x_submit_gisaid__mutmut_262": 1, + "gisaid_handler.x_submit_gisaid__mutmut_263": 1, + "gisaid_handler.x_submit_gisaid__mutmut_264": 1, + "gisaid_handler.x_submit_gisaid__mutmut_265": 1, + "gisaid_handler.x_submit_gisaid__mutmut_266": 1, + "gisaid_handler.x_submit_gisaid__mutmut_267": 1, + "gisaid_handler.x_submit_gisaid__mutmut_268": 37, + "gisaid_handler.x_submit_gisaid__mutmut_269": 37, + "gisaid_handler.x_submit_gisaid__mutmut_270": 1, + "gisaid_handler.x_submit_gisaid__mutmut_271": 1, + "gisaid_handler.x_submit_gisaid__mutmut_272": 1, + "gisaid_handler.x_submit_gisaid__mutmut_273": 37, + "gisaid_handler.x_submit_gisaid__mutmut_274": 37, + "gisaid_handler.x_submit_gisaid__mutmut_275": 37, + "gisaid_handler.x_submit_gisaid__mutmut_276": 1, + "gisaid_handler.x_submit_gisaid__mutmut_277": 1, + "gisaid_handler.x_submit_gisaid__mutmut_278": 37, + "gisaid_handler.x_submit_gisaid__mutmut_279": 1, + "gisaid_handler.x_submit_gisaid__mutmut_280": 1, + "gisaid_handler.x_submit_gisaid__mutmut_281": 1, + "gisaid_handler.x_submit_gisaid__mutmut_282": 37, + "gisaid_handler.x_submit_gisaid__mutmut_283": 37, + "gisaid_handler.x_submit_gisaid__mutmut_284": 1, + "gisaid_handler.x_submit_gisaid__mutmut_285": 1, + "gisaid_handler.x_submit_gisaid__mutmut_286": 1, + "gisaid_handler.x_submit_gisaid__mutmut_287": 1, + "gisaid_handler.x_submit_gisaid__mutmut_288": 1, + "gisaid_handler.x_submit_gisaid__mutmut_289": 1, + "gisaid_handler.x_submit_gisaid__mutmut_290": 1, + "gisaid_handler.x_submit_gisaid__mutmut_291": 37, + "gisaid_handler.x_submit_gisaid__mutmut_292": 37, + "gisaid_handler.x_submit_gisaid__mutmut_293": 37, + "gisaid_handler.x_submit_gisaid__mutmut_294": 37, + "gisaid_handler.x_submit_gisaid__mutmut_295": 1, + "gisaid_handler.x_submit_gisaid__mutmut_296": 1, + "gisaid_handler.x_submit_gisaid__mutmut_297": 1, + "gisaid_handler.x_submit_gisaid__mutmut_298": 1, + "gisaid_handler.x_submit_gisaid__mutmut_299": 1, + "gisaid_handler.x_submit_gisaid__mutmut_300": 1, + "gisaid_handler.x_submit_gisaid__mutmut_301": 1, + "gisaid_handler.x_submit_gisaid__mutmut_302": 1, + "gisaid_handler.x_submit_gisaid__mutmut_303": 1, + "gisaid_handler.x_submit_gisaid__mutmut_304": 1, + "gisaid_handler.x_submit_gisaid__mutmut_305": 37, + "gisaid_handler.x_submit_gisaid__mutmut_306": 37, + "gisaid_handler.x_submit_gisaid__mutmut_307": 1, + "gisaid_handler.x_submit_gisaid__mutmut_308": 37, + "gisaid_handler.x_submit_gisaid__mutmut_309": 37, + "gisaid_handler.x_submit_gisaid__mutmut_310": 1, + "gisaid_handler.x_submit_gisaid__mutmut_311": 1, + "gisaid_handler.x_submit_gisaid__mutmut_312": 1, + "gisaid_handler.x_submit_gisaid__mutmut_313": 1, + "gisaid_handler.x_submit_gisaid__mutmut_314": 1, + "gisaid_handler.x_submit_gisaid__mutmut_315": 37, + "gisaid_handler.x_submit_gisaid__mutmut_316": 37, + "gisaid_handler.x_submit_gisaid__mutmut_317": 1, + "gisaid_handler.x_submit_gisaid__mutmut_318": 37, + "gisaid_handler.x_submit_gisaid__mutmut_319": 37, + "gisaid_handler.x_submit_gisaid__mutmut_320": 1, + "gisaid_handler.x_submit_gisaid__mutmut_321": 1, + "gisaid_handler.x_submit_gisaid__mutmut_322": 1, + "gisaid_handler.x_submit_gisaid__mutmut_323": 1, + "gisaid_handler.x_submit_gisaid__mutmut_324": 1, + "gisaid_handler.x_submit_gisaid__mutmut_325": 37, + "gisaid_handler.x_submit_gisaid__mutmut_326": 37, + "gisaid_handler.x_submit_gisaid__mutmut_327": 37, + "gisaid_handler.x_submit_gisaid__mutmut_328": 1, + "gisaid_handler.x_submit_gisaid__mutmut_329": 0, + "gisaid_handler.x_submit_gisaid__mutmut_330": 1, + "gisaid_handler.x_submit_gisaid__mutmut_331": 1, + "gisaid_handler.x_submit_gisaid__mutmut_332": 37, + "gisaid_handler.x_submit_gisaid__mutmut_333": 1, + "gisaid_handler.x_submit_gisaid__mutmut_334": 1, + "gisaid_handler.x_submit_gisaid__mutmut_335": 37, + "gisaid_handler.x_submit_gisaid__mutmut_336": 37, + "gisaid_handler.x_submit_gisaid__mutmut_337": 1, + "gisaid_handler.x_submit_gisaid__mutmut_338": 1, + "gisaid_handler.x_submit_gisaid__mutmut_339": 1, + "gisaid_handler.x_submit_gisaid__mutmut_340": 37, + "gisaid_handler.x_submit_gisaid__mutmut_341": 37, + "gisaid_handler.x_submit_gisaid__mutmut_342": 37, + "gisaid_handler.x_submit_gisaid__mutmut_343": 1, + "gisaid_handler.x_submit_gisaid__mutmut_344": 1, + "gisaid_handler.x_submit_gisaid__mutmut_345": 1, + "gisaid_handler.x_submit_gisaid__mutmut_346": 1, + "gisaid_handler.x_submit_gisaid__mutmut_347": 37, + "gisaid_handler.x_submit_gisaid__mutmut_348": 37, + "gisaid_handler.x_submit_gisaid__mutmut_349": 37, + "gisaid_handler.x_submit_gisaid__mutmut_350": 37, + "gisaid_handler.x_submit_gisaid__mutmut_351": 37, + "gisaid_handler.x_submit_gisaid__mutmut_352": 37, + "gisaid_handler.x_submit_gisaid__mutmut_353": 1, + "gisaid_handler.x_submit_gisaid__mutmut_354": 1, + "gisaid_handler.x_submit_gisaid__mutmut_355": 1, + "gisaid_handler.x_submit_gisaid__mutmut_356": 1, + "gisaid_handler.x_submit_gisaid__mutmut_357": 1, + "gisaid_handler.x_submit_gisaid__mutmut_358": 1, + "gisaid_handler.x_submit_gisaid__mutmut_359": 1, + "gisaid_handler.x_submit_gisaid__mutmut_360": 37, + "gisaid_handler.x_submit_gisaid__mutmut_361": 37, + "gisaid_handler.x_submit_gisaid__mutmut_362": 1, + "gisaid_handler.x_submit_gisaid__mutmut_363": 1, + "gisaid_handler.x_submit_gisaid__mutmut_364": 1, + "gisaid_handler.x_submit_gisaid__mutmut_365": 1, + "gisaid_handler.x_submit_gisaid__mutmut_366": 1, + "gisaid_handler.x_submit_gisaid__mutmut_367": 1, + "gisaid_handler.x_submit_gisaid__mutmut_368": 1, + "gisaid_handler.x_submit_gisaid__mutmut_369": 1, + "gisaid_handler.x_submit_gisaid__mutmut_370": 1, + "gisaid_handler.x_submit_gisaid__mutmut_371": 1, + "gisaid_handler.x_submit_gisaid__mutmut_372": 1, + "gisaid_handler.x_submit_gisaid__mutmut_373": 37, + "gisaid_handler.x_submit_gisaid__mutmut_374": 37, + "gisaid_handler.x_submit_gisaid__mutmut_375": 1, + "gisaid_handler.x_submit_gisaid__mutmut_376": 1, + "gisaid_handler.x_submit_gisaid__mutmut_377": 1, + "gisaid_handler.x_submit_gisaid__mutmut_378": 1, + "gisaid_handler.x_submit_gisaid__mutmut_379": 1, + "gisaid_handler.x_submit_gisaid__mutmut_380": 1, + "gisaid_handler.x_submit_gisaid__mutmut_381": 1, + "gisaid_handler.x_submit_gisaid__mutmut_382": 0, + "gisaid_handler.x_submit_gisaid__mutmut_383": 0, + "gisaid_handler.x_update_gisaid_files__mutmut_1": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_2": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_3": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_4": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_5": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_6": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_7": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_8": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_9": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_10": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_11": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_12": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_13": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_14": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_15": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_16": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_17": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_18": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_19": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_20": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_21": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_22": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_23": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_24": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_25": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_26": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_27": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_28": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_29": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_30": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_31": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_32": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_33": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_34": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_35": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_36": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_37": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_38": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_39": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_40": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_41": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_42": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_43": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_44": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_45": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_46": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_47": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_48": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_49": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_50": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_51": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_52": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_53": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_54": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_55": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_56": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_57": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_58": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_59": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_60": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_61": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_62": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_63": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_64": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_65": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_66": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_67": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_68": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_69": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_70": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_71": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_72": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_73": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_74": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_75": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_76": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_77": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_78": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_79": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_80": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_81": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_82": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_83": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_84": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_85": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_86": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_87": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_88": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_89": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_90": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_91": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_92": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_93": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_94": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_95": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_96": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_97": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_98": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_99": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_100": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_101": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_102": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_103": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_104": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_105": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_106": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_107": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_108": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_109": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_110": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_111": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_112": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_113": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_114": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_115": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_116": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_117": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_118": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_119": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_120": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_121": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_122": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_123": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_124": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_125": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_126": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_127": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_128": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_129": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_130": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_131": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_132": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_133": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_134": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_135": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_136": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_137": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_138": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_139": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_140": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_141": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_142": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_143": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_144": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_145": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_146": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_147": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_148": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_149": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_150": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_151": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_152": 0, + "gisaid_handler.x_update_gisaid_files__mutmut_153": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_154": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_155": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_156": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_157": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_158": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_159": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_160": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_161": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_162": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_163": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_164": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_165": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_166": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_167": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_168": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_169": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_170": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_171": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_172": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_173": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_174": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_175": 37, + "gisaid_handler.x_update_gisaid_files__mutmut_176": 1, + "gisaid_handler.x_update_gisaid_files__mutmut_177": 1 + }, + "durations_by_key": { + "gisaid_handler.x_update_gisaid_files__mutmut_3": 3.717895, + "gisaid_handler.x_update_gisaid_files__mutmut_4": 3.734947, + "gisaid_handler.x_update_gisaid_files__mutmut_5": 3.735591, + "gisaid_handler.x_update_gisaid_files__mutmut_6": 3.896781, + "gisaid_handler.x_update_gisaid_files__mutmut_7": 3.889196, + "gisaid_handler.x_update_gisaid_files__mutmut_9": 3.880807, + "gisaid_handler.x_update_gisaid_files__mutmut_10": 3.860336, + "gisaid_handler.x_update_gisaid_files__mutmut_11": 3.85287, + "gisaid_handler.x_update_gisaid_files__mutmut_12": 3.803564, + "gisaid_handler.x_update_gisaid_files__mutmut_13": 3.765023, + "gisaid_handler.x_update_gisaid_files__mutmut_14": 3.692025, + "gisaid_handler.x_update_gisaid_files__mutmut_17": 3.710837, + "gisaid_handler.x_update_gisaid_files__mutmut_18": 3.772665, + "gisaid_handler.x_update_gisaid_files__mutmut_19": 3.847362, + "gisaid_handler.x_update_gisaid_files__mutmut_23": 3.862361, + "gisaid_handler.x_update_gisaid_files__mutmut_24": 3.83017, + "gisaid_handler.x_update_gisaid_files__mutmut_25": 3.824665, + "gisaid_handler.x_update_gisaid_files__mutmut_26": 3.815032, + "gisaid_handler.x_update_gisaid_files__mutmut_27": 3.785315, + "gisaid_handler.x_update_gisaid_files__mutmut_30": 3.639977, + "gisaid_handler.x_update_gisaid_files__mutmut_31": 3.637668, + "gisaid_handler.x_update_gisaid_files__mutmut_32": 3.630202, + "gisaid_handler.x_update_gisaid_files__mutmut_33": 3.657768, + "gisaid_handler.x_update_gisaid_files__mutmut_37": 3.69364, + "gisaid_handler.x_update_gisaid_files__mutmut_38": 3.754053, + "gisaid_handler.x_update_gisaid_files__mutmut_39": 3.784148, + "gisaid_handler.x_update_gisaid_files__mutmut_40": 3.784969, + "gisaid_handler.x_update_gisaid_files__mutmut_44": 3.578667, + "gisaid_handler.x_update_gisaid_files__mutmut_45": 3.581251, + "gisaid_handler.x_update_gisaid_files__mutmut_46": 3.585047, + "gisaid_handler.x_update_gisaid_files__mutmut_47": 3.58279, + "gisaid_handler.x_update_gisaid_files__mutmut_50": 3.549324, + "gisaid_handler.x_update_gisaid_files__mutmut_52": 3.584065, + "gisaid_handler.x_update_gisaid_files__mutmut_53": 3.593228, + "gisaid_handler.x_update_gisaid_files__mutmut_54": 3.655448, + "gisaid_handler.x_update_gisaid_files__mutmut_55": 3.684625, + "gisaid_handler.x_update_gisaid_files__mutmut_56": 3.664097, + "gisaid_handler.x_update_gisaid_files__mutmut_57": 3.586526, + "gisaid_handler.x_update_gisaid_files__mutmut_60": 3.572967, + "gisaid_handler.x_update_gisaid_files__mutmut_61": 3.560724, + "gisaid_handler.x_update_gisaid_files__mutmut_62": 3.56153, + "gisaid_handler.x_update_gisaid_files__mutmut_63": 3.559524, + "gisaid_handler.x_update_gisaid_files__mutmut_64": 3.557052, + "gisaid_handler.x_update_gisaid_files__mutmut_66": 3.58161, + "gisaid_handler.x_update_gisaid_files__mutmut_67": 3.636172, + "gisaid_handler.x_update_gisaid_files__mutmut_68": 3.71977, + "gisaid_handler.x_update_gisaid_files__mutmut_69": 3.727071, + "gisaid_handler.x_update_gisaid_files__mutmut_70": 3.645583, + "gisaid_handler.x_update_gisaid_files__mutmut_71": 3.580749, + "gisaid_handler.x_update_gisaid_files__mutmut_74": 3.517568, + "gisaid_handler.x_update_gisaid_files__mutmut_75": 3.525338, + "gisaid_handler.x_update_gisaid_files__mutmut_76": 3.559863, + "gisaid_handler.x_update_gisaid_files__mutmut_77": 3.603761, + "gisaid_handler.x_update_gisaid_files__mutmut_78": 3.609729, + "gisaid_handler.x_update_gisaid_files__mutmut_79": 3.730891, + "gisaid_handler.x_update_gisaid_files__mutmut_80": 3.834832, + "gisaid_handler.x_update_gisaid_files__mutmut_81": 3.829205, + "gisaid_handler.x_update_gisaid_files__mutmut_82": 3.781991, + "gisaid_handler.x_update_gisaid_files__mutmut_83": 3.717816, + "gisaid_handler.x_update_gisaid_files__mutmut_84": 3.645829, + "gisaid_handler.x_update_gisaid_files__mutmut_85": 3.595221, + "gisaid_handler.x_update_gisaid_files__mutmut_86": 3.597375, + "gisaid_handler.x_update_gisaid_files__mutmut_88": 3.583078, + "gisaid_handler.x_update_gisaid_files__mutmut_89": 3.607101, + "gisaid_handler.x_update_gisaid_files__mutmut_90": 3.70303, + "gisaid_handler.x_update_gisaid_files__mutmut_91": 3.786677, + "gisaid_handler.x_update_gisaid_files__mutmut_92": 3.880089, + "gisaid_handler.x_update_gisaid_files__mutmut_93": 3.93017, + "gisaid_handler.x_update_gisaid_files__mutmut_94": 3.888708, + "gisaid_handler.x_update_gisaid_files__mutmut_95": 3.824237, + "gisaid_handler.x_update_gisaid_files__mutmut_96": 3.802155, + "gisaid_handler.x_update_gisaid_files__mutmut_97": 3.804982, + "gisaid_handler.x_update_gisaid_files__mutmut_98": 3.811584, + "gisaid_handler.x_update_gisaid_files__mutmut_99": 3.811378, + "gisaid_handler.x_update_gisaid_files__mutmut_100": 3.830819, + "gisaid_handler.x_update_gisaid_files__mutmut_102": 3.939119, + "gisaid_handler.x_update_gisaid_files__mutmut_103": 3.915061, + "gisaid_handler.x_update_gisaid_files__mutmut_104": 3.915861, + "gisaid_handler.x_update_gisaid_files__mutmut_106": 3.810973, + "gisaid_handler.x_update_gisaid_files__mutmut_107": 3.707071, + "gisaid_handler.x_update_gisaid_files__mutmut_108": 3.701902, + "gisaid_handler.x_update_gisaid_files__mutmut_109": 3.745163, + "gisaid_handler.x_update_gisaid_files__mutmut_110": 3.771669, + "gisaid_handler.x_update_gisaid_files__mutmut_111": 3.859165, + "gisaid_handler.x_update_gisaid_files__mutmut_113": 3.937284, + "gisaid_handler.x_update_gisaid_files__mutmut_114": 4.029075, + "gisaid_handler.x_update_gisaid_files__mutmut_118": 4.001775, + "gisaid_handler.x_update_gisaid_files__mutmut_119": 4.020869, + "gisaid_handler.x_update_gisaid_files__mutmut_121": 3.926395, + "gisaid_handler.x_update_gisaid_files__mutmut_122": 3.892183, + "gisaid_handler.x_update_gisaid_files__mutmut_123": 3.828657, + "gisaid_handler.x_update_gisaid_files__mutmut_126": 3.75674, + "gisaid_handler.x_update_gisaid_files__mutmut_127": 3.810129, + "gisaid_handler.x_update_gisaid_files__mutmut_130": 3.836648, + "gisaid_handler.x_update_gisaid_files__mutmut_133": 3.994903, + "gisaid_handler.x_update_gisaid_files__mutmut_134": 3.987204, + "gisaid_handler.x_update_gisaid_files__mutmut_135": 3.990001, + "gisaid_handler.x_update_gisaid_files__mutmut_136": 3.980075, + "gisaid_handler.x_update_gisaid_files__mutmut_137": 3.965056, + "gisaid_handler.x_update_gisaid_files__mutmut_140": 3.811442, + "gisaid_handler.x_update_gisaid_files__mutmut_143": 3.806044, + "gisaid_handler.x_update_gisaid_files__mutmut_144": 3.81562, + "gisaid_handler.x_update_gisaid_files__mutmut_145": 3.887797, + "gisaid_handler.x_update_gisaid_files__mutmut_146": 3.960614, + "gisaid_handler.x_update_gisaid_files__mutmut_147": 4.02725, + "gisaid_handler.x_update_gisaid_files__mutmut_151": 3.984533, + "gisaid_handler.x_update_gisaid_files__mutmut_152": 3.970005, + "gisaid_handler.x_update_gisaid_files__mutmut_153": 3.875627, + "gisaid_handler.x_update_gisaid_files__mutmut_154": 3.790589, + "gisaid_handler.x_update_gisaid_files__mutmut_156": 3.722031, + "gisaid_handler.x_update_gisaid_files__mutmut_157": 3.719382, + "gisaid_handler.x_update_gisaid_files__mutmut_160": 3.69618, + "gisaid_handler.x_update_gisaid_files__mutmut_161": 3.714575, + "gisaid_handler.x_update_gisaid_files__mutmut_162": 3.71494, + "gisaid_handler.x_update_gisaid_files__mutmut_166": 3.772405, + "gisaid_handler.x_update_gisaid_files__mutmut_167": 3.816143, + "gisaid_handler.x_update_gisaid_files__mutmut_168": 3.795061, + "gisaid_handler.x_update_gisaid_files__mutmut_169": 3.749, + "gisaid_handler.x_update_gisaid_files__mutmut_176": 3.562334, + "gisaid_handler.x_update_gisaid_files__mutmut_177": 3.595191, + "gisaid_handler.x_process_gisaid_log__mutmut_5": 3.884891, + "gisaid_handler.x_process_gisaid_log__mutmut_6": 3.936907, + "gisaid_handler.x_process_gisaid_log__mutmut_7": 3.950819, + "gisaid_handler.x_process_gisaid_log__mutmut_12": 3.934244, + "gisaid_handler.x_process_gisaid_log__mutmut_13": 3.942635, + "gisaid_handler.x_process_gisaid_log__mutmut_14": 3.938651, + "gisaid_handler.x_process_gisaid_log__mutmut_15": 3.934827, + "gisaid_handler.x_process_gisaid_log__mutmut_21": 3.896021, + "gisaid_handler.x_process_gisaid_log__mutmut_22": 3.89136, + "gisaid_handler.x_process_gisaid_log__mutmut_23": 3.879932, + "gisaid_handler.x_process_gisaid_log__mutmut_29": 3.721194, + "gisaid_handler.x_process_gisaid_log__mutmut_30": 3.723832, + "gisaid_handler.x_process_gisaid_log__mutmut_31": 3.75392, + "gisaid_handler.x_process_gisaid_log__mutmut_34": 3.867271, + "gisaid_handler.x_process_gisaid_log__mutmut_36": 3.891187, + "gisaid_handler.x_process_gisaid_log__mutmut_37": 3.889623, + "gisaid_handler.x_process_gisaid_log__mutmut_38": 3.886927, + "gisaid_handler.x_process_gisaid_log__mutmut_39": 3.923556, + "gisaid_handler.x_process_gisaid_log__mutmut_41": 3.804951, + "gisaid_handler.x_process_gisaid_log__mutmut_46": 3.735923, + "gisaid_handler.x_process_gisaid_log__mutmut_47": 3.84266, + "gisaid_handler.x_process_gisaid_log__mutmut_49": 3.917023, + "gisaid_handler.x_process_gisaid_log__mutmut_50": 3.914958, + "gisaid_handler.x_process_gisaid_log__mutmut_51": 3.913508, + "gisaid_handler.x_process_gisaid_log__mutmut_52": 3.92578, + "gisaid_handler.x_process_gisaid_log__mutmut_57": 3.929537, + "gisaid_handler.x_process_gisaid_log__mutmut_58": 3.871954, + "gisaid_handler.x_process_gisaid_log__mutmut_60": 3.682777, + "gisaid_handler.x_process_gisaid_log__mutmut_61": 3.751082, + "gisaid_handler.x_process_gisaid_log__mutmut_62": 3.820468, + "gisaid_handler.x_process_gisaid_log__mutmut_63": 4.008391, + "gisaid_handler.x_process_gisaid_log__mutmut_68": 3.980683, + "gisaid_handler.x_process_gisaid_log__mutmut_69": 3.995372, + "gisaid_handler.x_process_gisaid_log__mutmut_70": 3.996151, + "gisaid_handler.x_process_gisaid_log__mutmut_75": 3.945245, + "gisaid_handler.x_process_gisaid_log__mutmut_76": 3.946332, + "gisaid_handler.x_process_gisaid_log__mutmut_77": 3.905367, + "gisaid_handler.x_process_gisaid_log__mutmut_80": 3.765478, + "gisaid_handler.x_process_gisaid_log__mutmut_85": 3.775555, + "gisaid_handler.x_process_gisaid_log__mutmut_86": 3.827794, + "gisaid_handler.x_process_gisaid_log__mutmut_87": 4.000276, + "gisaid_handler.x_process_gisaid_log__mutmut_92": 4.001515, + "gisaid_handler.x_process_gisaid_log__mutmut_93": 4.009109, + "gisaid_handler.x_process_gisaid_log__mutmut_96": 4.004919, + "gisaid_handler.x_process_gisaid_log__mutmut_98": 3.92835, + "gisaid_handler.x_process_gisaid_log__mutmut_100": 3.871312, + "gisaid_handler.x_process_gisaid_log__mutmut_101": 3.907457, + "gisaid_handler.x_process_gisaid_log__mutmut_102": 3.995346, + "gisaid_handler.x_process_gisaid_log__mutmut_103": 4.03994, + "gisaid_handler.x_process_gisaid_log__mutmut_108": 4.116507, + "gisaid_handler.x_process_gisaid_log__mutmut_109": 4.116307, + "gisaid_handler.x_process_gisaid_log__mutmut_110": 4.207706, + "gisaid_handler.x_process_gisaid_log__mutmut_115": 4.144996, + "gisaid_handler.x_process_gisaid_log__mutmut_116": 4.077535, + "gisaid_handler.x_process_gisaid_log__mutmut_119": 3.888163, + "gisaid_handler.x_process_gisaid_log__mutmut_121": 3.888518, + "gisaid_handler.x_process_gisaid_log__mutmut_123": 3.949058, + "gisaid_handler.x_process_gisaid_log__mutmut_124": 4.035319, + "gisaid_handler.x_process_gisaid_log__mutmut_125": 4.16423, + "gisaid_handler.x_process_gisaid_log__mutmut_126": 4.16662, + "gisaid_handler.x_process_gisaid_log__mutmut_127": 4.174782, + "gisaid_handler.x_process_gisaid_log__mutmut_128": 4.17071, + "gisaid_handler.x_process_gisaid_log__mutmut_129": 4.158438, + "gisaid_handler.x_process_gisaid_log__mutmut_130": 4.099044, + "gisaid_handler.x_process_gisaid_log__mutmut_133": 3.917418, + "gisaid_handler.x_process_gisaid_log__mutmut_135": 4.093146, + "gisaid_handler.x_process_gisaid_log__mutmut_136": 4.097559, + "gisaid_handler.x_process_gisaid_log__mutmut_137": 4.059661, + "gisaid_handler.x_process_gisaid_log__mutmut_138": 4.026872, + "gisaid_handler.x_process_gisaid_log__mutmut_139": 3.998199, + "gisaid_handler.x_process_gisaid_log__mutmut_140": 4.013362, + "gisaid_handler.x_process_gisaid_log__mutmut_141": 3.936614, + "gisaid_handler.x_process_gisaid_log__mutmut_142": 3.969422, + "gisaid_handler.x_process_gisaid_log__mutmut_149": 3.956472, + "gisaid_handler.x_process_gisaid_log__mutmut_150": 3.98365, + "gisaid_handler.x_process_gisaid_log__mutmut_157": 3.906931, + "gisaid_handler.x_process_gisaid_log__mutmut_158": 3.89972, + "gisaid_handler.x_process_gisaid_log__mutmut_159": 3.89699, + "gisaid_handler.x_process_gisaid_log__mutmut_160": 3.886894, + "gisaid_handler.x_process_gisaid_log__mutmut_161": 3.885691, + "gisaid_handler.x_process_gisaid_log__mutmut_162": 3.812865, + "gisaid_handler.x_process_gisaid_log__mutmut_163": 3.745078, + "gisaid_handler.x_process_gisaid_log__mutmut_170": 3.771281, + "gisaid_handler.x_process_gisaid_log__mutmut_171": 3.795441, + "gisaid_handler.x_process_gisaid_log__mutmut_172": 3.798584, + "gisaid_handler.x_process_gisaid_log__mutmut_173": 3.799687, + "gisaid_handler.x_process_gisaid_log__mutmut_174": 3.768492, + "gisaid_handler.x_process_gisaid_log__mutmut_175": 3.774767, + "gisaid_handler.x_process_gisaid_log__mutmut_176": 3.775988, + "gisaid_handler.x_process_gisaid_log__mutmut_183": 3.597575, + "gisaid_handler.x_process_gisaid_log__mutmut_184": 3.594079, + "gisaid_handler.x_process_gisaid_log__mutmut_185": 3.650879, + "gisaid_handler.x_process_gisaid_log__mutmut_186": 3.736394, + "gisaid_handler.x_process_gisaid_log__mutmut_187": 3.839421, + "gisaid_handler.x_process_gisaid_log__mutmut_188": 3.864225, + "gisaid_handler.x_process_gisaid_log__mutmut_190": 3.877915, + "gisaid_handler.x_process_gisaid_log__mutmut_193": 3.800894, + "gisaid_handler.x_process_gisaid_log__mutmut_195": 600.998539, + "gisaid_handler.x_process_gisaid_log__mutmut_196": 3.522973, + "gisaid_handler.x_process_gisaid_log__mutmut_197": 3.524656, + "gisaid_handler.x_process_gisaid_log__mutmut_198": 3.527053, + "gisaid_handler.x_process_gisaid_log__mutmut_199": 3.578009, + "gisaid_handler.x_process_gisaid_log__mutmut_200": 3.626845, + "gisaid_handler.x_process_gisaid_log__mutmut_201": 3.69918, + "gisaid_handler.x_process_gisaid_log__mutmut_202": 3.807141, + "gisaid_handler.x_process_gisaid_log__mutmut_204": 3.800742, + "gisaid_handler.x_process_gisaid_log__mutmut_207": 3.625525, + "gisaid_handler.x_process_gisaid_log__mutmut_209": 3.589378, + "gisaid_handler.x_process_gisaid_log__mutmut_210": 3.588092, + "gisaid_handler.x_process_gisaid_log__mutmut_211": 3.588128, + "gisaid_handler.x_process_gisaid_log__mutmut_212": 3.59994, + "gisaid_handler.x_process_gisaid_log__mutmut_213": 3.599008, + "gisaid_handler.x_process_gisaid_log__mutmut_214": 3.606255, + "gisaid_handler.x_process_gisaid_log__mutmut_215": 3.609561, + "gisaid_handler.x_process_gisaid_log__mutmut_216": 3.6995, + "gisaid_handler.x_process_gisaid_log__mutmut_217": 3.684875, + "gisaid_handler.x_process_gisaid_log__mutmut_218": 3.653527, + "gisaid_handler.x_create_gisaid_files__mutmut_2": 3.546651, + "gisaid_handler.x_create_gisaid_files__mutmut_8": 3.520094, + "gisaid_handler.x_create_gisaid_files__mutmut_9": 3.49521, + "gisaid_handler.x_create_gisaid_files__mutmut_10": 3.492157, + "gisaid_handler.x_create_gisaid_files__mutmut_11": 3.48252, + "gisaid_handler.x_create_gisaid_files__mutmut_12": 3.501811, + "gisaid_handler.x_create_gisaid_files__mutmut_13": 3.510078, + "gisaid_handler.x_create_gisaid_files__mutmut_14": 3.562568, + "gisaid_handler.x_create_gisaid_files__mutmut_15": 3.588641, + "gisaid_handler.x_create_gisaid_files__mutmut_16": 3.571521, + "gisaid_handler.x_create_gisaid_files__mutmut_17": 3.465878, + "gisaid_handler.x_create_gisaid_files__mutmut_18": 3.455802, + "gisaid_handler.x_create_gisaid_files__mutmut_19": 3.473886, + "gisaid_handler.x_create_gisaid_files__mutmut_20": 3.47262, + "gisaid_handler.x_create_gisaid_files__mutmut_21": 3.496846, + "gisaid_handler.x_create_gisaid_files__mutmut_22": 3.543216, + "gisaid_handler.x_create_gisaid_files__mutmut_24": 3.538481, + "gisaid_handler.x_create_gisaid_files__mutmut_25": 3.570296, + "gisaid_handler.x_create_gisaid_files__mutmut_26": 3.640358, + "gisaid_handler.x_create_gisaid_files__mutmut_27": 3.679804, + "gisaid_handler.x_create_gisaid_files__mutmut_28": 3.606449, + "gisaid_handler.x_create_gisaid_files__mutmut_29": 3.564357, + "gisaid_handler.x_create_gisaid_files__mutmut_30": 3.500625, + "gisaid_handler.x_create_gisaid_files__mutmut_31": 3.508763, + "gisaid_handler.x_create_gisaid_files__mutmut_34": 3.458937, + "gisaid_handler.x_create_gisaid_files__mutmut_35": 3.461985, + "gisaid_handler.x_create_gisaid_files__mutmut_36": 3.471702, + "gisaid_handler.x_create_gisaid_files__mutmut_37": 3.468698, + "gisaid_handler.x_create_gisaid_files__mutmut_39": 3.537339, + "gisaid_handler.x_create_gisaid_files__mutmut_40": 3.59025, + "gisaid_handler.x_create_gisaid_files__mutmut_41": 3.540936, + "gisaid_handler.x_create_gisaid_files__mutmut_42": 3.523345, + "gisaid_handler.x_create_gisaid_files__mutmut_44": 3.481551, + "gisaid_handler.x_create_gisaid_files__mutmut_45": 3.511702, + "gisaid_handler.x_create_gisaid_files__mutmut_46": 3.508986, + "gisaid_handler.x_create_gisaid_files__mutmut_48": 3.505483, + "gisaid_handler.x_create_gisaid_files__mutmut_49": 3.508604, + "gisaid_handler.x_create_gisaid_files__mutmut_50": 3.484611, + "gisaid_handler.x_create_gisaid_files__mutmut_51": 3.438597, + "gisaid_handler.x_create_gisaid_files__mutmut_52": 3.449126, + "gisaid_handler.x_create_gisaid_files__mutmut_53": 3.483992, + "gisaid_handler.x_create_gisaid_files__mutmut_54": 3.508097, + "gisaid_handler.x_create_gisaid_files__mutmut_55": 3.467104, + "gisaid_handler.x_create_gisaid_files__mutmut_56": 3.421905, + "gisaid_handler.x_create_gisaid_files__mutmut_57": 3.421668, + "gisaid_handler.x_create_gisaid_files__mutmut_58": 3.420543, + "gisaid_handler.x_create_gisaid_files__mutmut_59": 3.447155, + "gisaid_handler.x_create_gisaid_files__mutmut_60": 3.455686, + "gisaid_handler.x_create_gisaid_files__mutmut_61": 3.453341, + "gisaid_handler.x_create_gisaid_files__mutmut_63": 3.447593, + "gisaid_handler.x_create_gisaid_files__mutmut_64": 3.519869, + "gisaid_handler.x_create_gisaid_files__mutmut_65": 3.526284, + "gisaid_handler.x_create_gisaid_files__mutmut_66": 3.525681, + "gisaid_handler.x_create_gisaid_files__mutmut_67": 3.556223, + "gisaid_handler.x_create_gisaid_files__mutmut_68": 3.52958, + "gisaid_handler.x_create_gisaid_files__mutmut_69": 3.503385, + "gisaid_handler.x_create_gisaid_files__mutmut_71": 3.467908, + "gisaid_handler.x_create_gisaid_files__mutmut_72": 3.467015, + "gisaid_handler.x_create_gisaid_files__mutmut_73": 3.471834, + "gisaid_handler.x_create_gisaid_files__mutmut_74": 3.466491, + "gisaid_handler.x_create_gisaid_files__mutmut_75": 3.490745, + "gisaid_handler.x_create_gisaid_files__mutmut_76": 3.50925, + "gisaid_handler.x_create_gisaid_files__mutmut_77": 3.552444, + "gisaid_handler.x_create_gisaid_files__mutmut_78": 3.533122, + "gisaid_handler.x_create_gisaid_files__mutmut_79": 3.486716, + "gisaid_handler.x_create_gisaid_files__mutmut_80": 3.534211, + "gisaid_handler.x_create_gisaid_files__mutmut_81": 3.537615, + "gisaid_handler.x_create_gisaid_files__mutmut_82": 3.545711, + "gisaid_handler.x_create_gisaid_files__mutmut_83": 3.547721, + "gisaid_handler.x_create_gisaid_files__mutmut_84": 3.52811, + "gisaid_handler.x_create_gisaid_files__mutmut_85": 3.516358, + "gisaid_handler.x_create_gisaid_files__mutmut_86": 3.535929, + "gisaid_handler.x_create_gisaid_files__mutmut_87": 3.537232, + "gisaid_handler.x_create_gisaid_files__mutmut_88": 3.512888, + "gisaid_handler.x_create_gisaid_files__mutmut_89": 3.493341, + "gisaid_handler.x_create_gisaid_files__mutmut_90": 3.522716, + "gisaid_handler.x_create_gisaid_files__mutmut_91": 3.492048, + "gisaid_handler.x_create_gisaid_files__mutmut_92": 3.454514, + "gisaid_handler.x_create_gisaid_files__mutmut_94": 3.456879, + "gisaid_handler.x_create_gisaid_files__mutmut_95": 3.457725, + "gisaid_handler.x_create_gisaid_files__mutmut_96": 3.485572, + "gisaid_handler.x_create_gisaid_files__mutmut_97": 3.484543, + "gisaid_handler.x_create_gisaid_files__mutmut_98": 3.487251, + "gisaid_handler.x_create_gisaid_files__mutmut_99": 3.461128, + "gisaid_handler.x_create_gisaid_files__mutmut_100": 3.505528, + "gisaid_handler.x_create_gisaid_files__mutmut_101": 3.518078, + "gisaid_handler.x_create_gisaid_files__mutmut_102": 3.556008, + "gisaid_handler.x_create_gisaid_files__mutmut_103": 3.587595, + "gisaid_handler.x_create_gisaid_files__mutmut_104": 3.498625, + "gisaid_handler.x_create_gisaid_files__mutmut_105": 3.481824, + "gisaid_handler.x_create_gisaid_files__mutmut_106": 3.472983, + "gisaid_handler.x_create_gisaid_files__mutmut_107": 3.489844, + "gisaid_handler.x_create_gisaid_files__mutmut_109": 3.468568, + "gisaid_handler.x_create_gisaid_files__mutmut_110": 3.480669, + "gisaid_handler.x_create_gisaid_files__mutmut_111": 3.491433, + "gisaid_handler.x_create_gisaid_files__mutmut_112": 3.546023, + "gisaid_handler.x_create_gisaid_files__mutmut_113": 3.554529, + "gisaid_handler.x_create_gisaid_files__mutmut_115": 3.627503, + "gisaid_handler.x_create_gisaid_files__mutmut_116": 3.626406, + "gisaid_handler.x_create_gisaid_files__mutmut_117": 3.659434, + "gisaid_handler.x_create_gisaid_files__mutmut_119": 3.681218, + "gisaid_handler.x_create_gisaid_files__mutmut_120": 3.712545, + "gisaid_handler.x_create_gisaid_files__mutmut_121": 3.705829, + "gisaid_handler.x_create_gisaid_files__mutmut_122": 3.747821, + "gisaid_handler.x_create_gisaid_files__mutmut_123": 3.785768, + "gisaid_handler.x_create_gisaid_files__mutmut_124": 4.003027, + "gisaid_handler.x_create_gisaid_files__mutmut_125": 3.992306, + "gisaid_handler.x_create_gisaid_files__mutmut_126": 3.942285, + "gisaid_handler.x_create_gisaid_files__mutmut_127": 3.860712, + "gisaid_handler.x_create_gisaid_files__mutmut_128": 3.772249, + "gisaid_handler.x_create_gisaid_files__mutmut_129": 3.759152, + "gisaid_handler.x_create_gisaid_files__mutmut_130": 3.804847, + "gisaid_handler.x_create_gisaid_files__mutmut_131": 3.814336, + "gisaid_handler.x_create_gisaid_files__mutmut_133": 3.869731, + "gisaid_handler.x_create_gisaid_files__mutmut_134": 3.929216, + "gisaid_handler.x_create_gisaid_files__mutmut_135": 4.087394, + "gisaid_handler.x_create_gisaid_files__mutmut_136": 4.077334, + "gisaid_handler.x_create_gisaid_files__mutmut_137": 4.075226, + "gisaid_handler.x_create_gisaid_files__mutmut_138": 4.041927, + "gisaid_handler.x_create_gisaid_files__mutmut_139": 4.07461, + "gisaid_handler.x_create_gisaid_files__mutmut_146": 3.958523, + "gisaid_handler.x_create_gisaid_files__mutmut_148": 3.995403, + "gisaid_handler.x_create_gisaid_files__mutmut_150": 4.011206, + "gisaid_handler.x_create_gisaid_files__mutmut_151": 4.069101, + "gisaid_handler.x_create_gisaid_files__mutmut_152": 4.038328, + "gisaid_handler.x_create_gisaid_files__mutmut_153": 4.024407, + "gisaid_handler.x_create_gisaid_files__mutmut_154": 3.979199, + "gisaid_handler.x_create_gisaid_files__mutmut_155": 4.057883, + "gisaid_handler.x_create_gisaid_files__mutmut_160": 3.820094, + "gisaid_handler.x_create_gisaid_files__mutmut_161": 3.871285, + "gisaid_handler.x_create_gisaid_files__mutmut_162": 3.943502, + "gisaid_handler.x_create_gisaid_files__mutmut_163": 3.981789, + "gisaid_handler.x_create_gisaid_files__mutmut_164": 4.052459, + "gisaid_handler.x_create_gisaid_files__mutmut_165": 4.149745, + "gisaid_handler.x_create_gisaid_files__mutmut_166": 4.104771, + "gisaid_handler.x_create_gisaid_files__mutmut_167": 4.139582, + "gisaid_handler.x_create_gisaid_files__mutmut_168": 4.066406, + "gisaid_handler.x_create_gisaid_files__mutmut_170": 4.030502, + "gisaid_handler.x_create_gisaid_files__mutmut_175": 3.869991, + "gisaid_handler.x_create_gisaid_files__mutmut_178": 3.861759, + "gisaid_handler.x_create_gisaid_files__mutmut_179": 3.868879, + "gisaid_handler.x_create_gisaid_files__mutmut_180": 4.044362, + "gisaid_handler.x_create_gisaid_files__mutmut_187": 3.932217, + "gisaid_handler.x_create_gisaid_files__mutmut_188": 3.888031, + "gisaid_handler.x_create_gisaid_files__mutmut_189": 3.813218, + "gisaid_handler.x_create_gisaid_files__mutmut_190": 3.754959, + "gisaid_handler.x_create_gisaid_files__mutmut_193": 3.656107, + "gisaid_handler.x_create_gisaid_files__mutmut_194": 3.656017, + "gisaid_handler.x_create_gisaid_files__mutmut_195": 3.707039, + "gisaid_handler.x_create_gisaid_files__mutmut_196": 3.792875, + "gisaid_handler.x_create_gisaid_files__mutmut_205": 3.742091, + "gisaid_handler.x_create_gisaid_files__mutmut_206": 3.810953, + "gisaid_handler.x_create_gisaid_files__mutmut_213": 3.768925, + "gisaid_handler.x_create_gisaid_files__mutmut_214": 3.743866, + "gisaid_handler.x_create_gisaid_files__mutmut_215": 3.705737, + "gisaid_handler.x_create_gisaid_files__mutmut_216": 3.642842, + "gisaid_handler.x_create_gisaid_files__mutmut_219": 3.537017, + "gisaid_handler.x_create_gisaid_files__mutmut_220": 3.532593, + "gisaid_handler.x_create_gisaid_files__mutmut_221": 3.526725, + "gisaid_handler.x_create_gisaid_files__mutmut_222": 3.533626, + "gisaid_handler.x_submit_gisaid__mutmut_4": 3.739211, + "gisaid_handler.x_submit_gisaid__mutmut_5": 3.756974, + "gisaid_handler.x_submit_gisaid__mutmut_6": 3.830863, + "gisaid_handler.x_submit_gisaid__mutmut_7": 3.903173, + "gisaid_handler.x_submit_gisaid__mutmut_11": 3.944485, + "gisaid_handler.x_submit_gisaid__mutmut_12": 4.012773, + "gisaid_handler.x_submit_gisaid__mutmut_13": 3.996795, + "gisaid_handler.x_submit_gisaid__mutmut_14": 3.932399, + "gisaid_handler.x_submit_gisaid__mutmut_18": 3.739641, + "gisaid_handler.x_submit_gisaid__mutmut_19": 3.752078, + "gisaid_handler.x_submit_gisaid__mutmut_20": 3.752205, + "gisaid_handler.x_submit_gisaid__mutmut_21": 3.751916, + "gisaid_handler.x_submit_gisaid__mutmut_25": 3.70054, + "gisaid_handler.x_submit_gisaid__mutmut_26": 3.678176, + "gisaid_handler.x_submit_gisaid__mutmut_27": 3.902485, + "gisaid_handler.x_submit_gisaid__mutmut_28": 3.889723, + "gisaid_handler.x_submit_gisaid__mutmut_32": 3.674545, + "gisaid_handler.x_submit_gisaid__mutmut_33": 3.631887, + "gisaid_handler.x_submit_gisaid__mutmut_35": 3.629384, + "gisaid_handler.x_submit_gisaid__mutmut_36": 3.577402, + "gisaid_handler.x_submit_gisaid__mutmut_41": 3.547508, + "gisaid_handler.x_submit_gisaid__mutmut_42": 3.550673, + "gisaid_handler.x_submit_gisaid__mutmut_50": 3.553135, + "gisaid_handler.x_submit_gisaid__mutmut_52": 3.719604, + "gisaid_handler.x_submit_gisaid__mutmut_54": 3.63665, + "gisaid_handler.x_submit_gisaid__mutmut_55": 3.561385, + "gisaid_handler.x_submit_gisaid__mutmut_56": 3.496534, + "gisaid_handler.x_submit_gisaid__mutmut_58": 3.272919, + "gisaid_handler.x_submit_gisaid__mutmut_59": 3.271857, + "gisaid_handler.x_submit_gisaid__mutmut_60": 3.276994, + "gisaid_handler.x_submit_gisaid__mutmut_63": 3.256792, + "gisaid_handler.x_submit_gisaid__mutmut_64": 3.297567, + "gisaid_handler.x_submit_gisaid__mutmut_65": 3.341337, + "gisaid_handler.x_submit_gisaid__mutmut_66": 3.415945, + "gisaid_handler.x_submit_gisaid__mutmut_67": 3.477813, + "gisaid_handler.x_submit_gisaid__mutmut_71": 3.259998, + "gisaid_handler.x_submit_gisaid__mutmut_72": 3.261489, + "gisaid_handler.x_submit_gisaid__mutmut_75": 3.265391, + "gisaid_handler.x_submit_gisaid__mutmut_76": 3.255185, + "gisaid_handler.x_submit_gisaid__mutmut_77": 3.255107, + "gisaid_handler.x_submit_gisaid__mutmut_78": 3.258846, + "gisaid_handler.x_submit_gisaid__mutmut_79": 3.269585, + "gisaid_handler.x_submit_gisaid__mutmut_81": 3.318055, + "gisaid_handler.x_submit_gisaid__mutmut_82": 3.311715, + "gisaid_handler.x_submit_gisaid__mutmut_86": 3.203277, + "gisaid_handler.x_submit_gisaid__mutmut_87": 3.249376, + "gisaid_handler.x_submit_gisaid__mutmut_88": 3.30867, + "gisaid_handler.x_submit_gisaid__mutmut_90": 3.325985, + "gisaid_handler.x_submit_gisaid__mutmut_91": 3.312269, + "gisaid_handler.x_submit_gisaid__mutmut_92": 3.314264, + "gisaid_handler.x_submit_gisaid__mutmut_93": 3.307298, + "gisaid_handler.x_submit_gisaid__mutmut_94": 3.298104, + "gisaid_handler.x_submit_gisaid__mutmut_95": 3.254458, + "gisaid_handler.x_submit_gisaid__mutmut_96": 3.208353, + "gisaid_handler.x_submit_gisaid__mutmut_97": 3.136741, + "gisaid_handler.x_submit_gisaid__mutmut_98": 3.130226, + "gisaid_handler.x_submit_gisaid__mutmut_99": 3.166341, + "gisaid_handler.x_submit_gisaid__mutmut_100": 3.241281, + "gisaid_handler.x_submit_gisaid__mutmut_101": 3.249686, + "gisaid_handler.x_submit_gisaid__mutmut_102": 3.259362, + "gisaid_handler.x_submit_gisaid__mutmut_103": 3.261195, + "gisaid_handler.x_submit_gisaid__mutmut_104": 3.251284, + "gisaid_handler.x_submit_gisaid__mutmut_105": 3.231836, + "gisaid_handler.x_submit_gisaid__mutmut_106": 3.180319, + "gisaid_handler.x_submit_gisaid__mutmut_107": 3.110289, + "gisaid_handler.x_submit_gisaid__mutmut_108": 3.024779, + "gisaid_handler.x_submit_gisaid__mutmut_109": 2.999544, + "gisaid_handler.x_submit_gisaid__mutmut_110": 3.028079, + "gisaid_handler.x_submit_gisaid__mutmut_111": 3.16087, + "gisaid_handler.x_submit_gisaid__mutmut_112": 3.215776, + "gisaid_handler.x_submit_gisaid__mutmut_113": 3.213176, + "gisaid_handler.x_submit_gisaid__mutmut_114": 3.212068, + "gisaid_handler.x_submit_gisaid__mutmut_115": 3.211878, + "gisaid_handler.x_submit_gisaid__mutmut_116": 3.242158, + "gisaid_handler.x_submit_gisaid__mutmut_117": 3.303627, + "gisaid_handler.x_submit_gisaid__mutmut_120": 2.9923, + "gisaid_handler.x_submit_gisaid__mutmut_121": 2.992847, + "gisaid_handler.x_submit_gisaid__mutmut_122": 2.989933, + "gisaid_handler.x_submit_gisaid__mutmut_123": 3.067354, + "gisaid_handler.x_submit_gisaid__mutmut_124": 3.065081, + "gisaid_handler.x_submit_gisaid__mutmut_125": 3.10558, + "gisaid_handler.x_submit_gisaid__mutmut_126": 3.112127, + "gisaid_handler.x_submit_gisaid__mutmut_127": 3.120654, + "gisaid_handler.x_submit_gisaid__mutmut_128": 3.15353, + "gisaid_handler.x_submit_gisaid__mutmut_129": 3.162029, + "gisaid_handler.x_submit_gisaid__mutmut_130": 3.194434, + "gisaid_handler.x_submit_gisaid__mutmut_134": 2.862656, + "gisaid_handler.x_submit_gisaid__mutmut_141": 3.012214, + "gisaid_handler.x_submit_gisaid__mutmut_142": 3.047953, + "gisaid_handler.x_submit_gisaid__mutmut_143": 3.046325, + "gisaid_handler.x_submit_gisaid__mutmut_145": 3.021073, + "gisaid_handler.x_submit_gisaid__mutmut_147": 3.02787, + "gisaid_handler.x_submit_gisaid__mutmut_148": 2.960726, + "gisaid_handler.x_submit_gisaid__mutmut_149": 2.909133, + "gisaid_handler.x_submit_gisaid__mutmut_150": 2.9106, + "gisaid_handler.x_submit_gisaid__mutmut_151": 2.90864, + "gisaid_handler.x_submit_gisaid__mutmut_152": 2.975094, + "gisaid_handler.x_submit_gisaid__mutmut_155": 3.060469, + "gisaid_handler.x_submit_gisaid__mutmut_156": 3.155758, + "gisaid_handler.x_submit_gisaid__mutmut_157": 3.177438, + "gisaid_handler.x_submit_gisaid__mutmut_161": 3.193952, + "gisaid_handler.x_submit_gisaid__mutmut_162": 3.214669, + "gisaid_handler.x_submit_gisaid__mutmut_57": 20.599339, + "gisaid_handler.x_submit_gisaid__mutmut_163": 3.267, + "gisaid_handler.x_submit_gisaid__mutmut_164": 3.334157, + "gisaid_handler.x_submit_gisaid__mutmut_168": 3.204149, + "gisaid_handler.x_submit_gisaid__mutmut_169": 3.296405, + "gisaid_handler.x_submit_gisaid__mutmut_170": 3.419765, + "gisaid_handler.x_submit_gisaid__mutmut_171": 3.561773, + "gisaid_handler.x_submit_gisaid__mutmut_173": 3.605452, + "gisaid_handler.x_submit_gisaid__mutmut_174": 3.664448, + "gisaid_handler.x_submit_gisaid__mutmut_175": 3.707868, + "gisaid_handler.x_submit_gisaid__mutmut_176": 3.724482, + "gisaid_handler.x_submit_gisaid__mutmut_177": 3.691135, + "gisaid_handler.x_submit_gisaid__mutmut_178": 3.71004, + "gisaid_handler.x_submit_gisaid__mutmut_179": 3.709395, + "gisaid_handler.x_submit_gisaid__mutmut_180": 3.763469, + "gisaid_handler.x_submit_gisaid__mutmut_181": 3.868379, + "gisaid_handler.x_submit_gisaid__mutmut_183": 3.817574, + "gisaid_handler.x_submit_gisaid__mutmut_184": 3.797009, + "gisaid_handler.x_submit_gisaid__mutmut_186": 3.703666, + "gisaid_handler.x_submit_gisaid__mutmut_188": 3.638079, + "gisaid_handler.x_submit_gisaid__mutmut_189": 3.565975, + "gisaid_handler.x_submit_gisaid__mutmut_190": 3.454654, + "gisaid_handler.x_submit_gisaid__mutmut_191": 3.413487, + "gisaid_handler.x_submit_gisaid__mutmut_192": 3.392145, + "gisaid_handler.x_submit_gisaid__mutmut_193": 3.597185, + "gisaid_handler.x_submit_gisaid__mutmut_194": 3.582026, + "gisaid_handler.x_submit_gisaid__mutmut_196": 3.526888, + "gisaid_handler.x_submit_gisaid__mutmut_198": 3.467091, + "gisaid_handler.x_submit_gisaid__mutmut_199": 3.437988, + "gisaid_handler.x_submit_gisaid__mutmut_200": 3.426327, + "gisaid_handler.x_submit_gisaid__mutmut_201": 3.297919, + "gisaid_handler.x_submit_gisaid__mutmut_202": 3.209728, + "gisaid_handler.x_submit_gisaid__mutmut_203": 3.128078, + "gisaid_handler.x_submit_gisaid__mutmut_205": 3.04357, + "gisaid_handler.x_submit_gisaid__mutmut_206": 3.11345, + "gisaid_handler.x_submit_gisaid__mutmut_207": 3.180581, + "gisaid_handler.x_submit_gisaid__mutmut_208": 3.204072, + "gisaid_handler.x_submit_gisaid__mutmut_209": 3.178478, + "gisaid_handler.x_submit_gisaid__mutmut_210": 3.154441, + "gisaid_handler.x_submit_gisaid__mutmut_211": 3.183506, + "gisaid_handler.x_submit_gisaid__mutmut_212": 3.137946, + "gisaid_handler.x_submit_gisaid__mutmut_213": 3.017565, + "gisaid_handler.x_submit_gisaid__mutmut_214": 2.881341, + "gisaid_handler.x_submit_gisaid__mutmut_215": 2.842498, + "gisaid_handler.x_submit_gisaid__mutmut_216": 2.965474, + "gisaid_handler.x_submit_gisaid__mutmut_217": 3.089488, + "gisaid_handler.x_submit_gisaid__mutmut_219": 3.122252, + "gisaid_handler.x_submit_gisaid__mutmut_221": 3.113291, + "gisaid_handler.x_submit_gisaid__mutmut_223": 3.106462, + "gisaid_handler.x_submit_gisaid__mutmut_224": 3.107664, + "gisaid_handler.x_submit_gisaid__mutmut_225": 3.104161, + "gisaid_handler.x_submit_gisaid__mutmut_226": 3.021445, + "gisaid_handler.x_submit_gisaid__mutmut_227": 2.974339, + "gisaid_handler.x_submit_gisaid__mutmut_118": 20.228415, + "gisaid_handler.x_submit_gisaid__mutmut_119": 20.167681, + "gisaid_handler.x_submit_gisaid__mutmut_228": 2.916945, + "gisaid_handler.x_submit_gisaid__mutmut_229": 2.884512, + "gisaid_handler.x_submit_gisaid__mutmut_230": 2.96076, + "gisaid_handler.x_submit_gisaid__mutmut_231": 3.150532, + "gisaid_handler.x_submit_gisaid__mutmut_131": 20.028469, + "gisaid_handler.x_submit_gisaid__mutmut_232": 3.163179, + "gisaid_handler.x_submit_gisaid__mutmut_234": 3.103892, + "gisaid_handler.x_submit_gisaid__mutmut_235": 3.089331, + "gisaid_handler.x_submit_gisaid__mutmut_236": 3.087285, + "gisaid_handler.x_submit_gisaid__mutmut_237": 3.094331, + "gisaid_handler.x_submit_gisaid__mutmut_238": 3.09859, + "gisaid_handler.x_submit_gisaid__mutmut_239": 2.976595, + "gisaid_handler.x_submit_gisaid__mutmut_241": 2.877245, + "gisaid_handler.x_submit_gisaid__mutmut_243": 2.879349, + "gisaid_handler.x_submit_gisaid__mutmut_245": 2.963513, + "gisaid_handler.x_submit_gisaid__mutmut_246": 3.069561, + "gisaid_handler.x_submit_gisaid__mutmut_247": 3.399335, + "gisaid_handler.x_submit_gisaid__mutmut_248": 3.403834, + "gisaid_handler.x_submit_gisaid__mutmut_249": 3.409907, + "gisaid_handler.x_submit_gisaid__mutmut_250": 3.401369, + "gisaid_handler.x_submit_gisaid__mutmut_251": 3.427879, + "gisaid_handler.x_submit_gisaid__mutmut_252": 3.596069, + "gisaid_handler.x_submit_gisaid__mutmut_253": 3.522202, + "gisaid_handler.x_submit_gisaid__mutmut_256": 3.309991, + "gisaid_handler.x_submit_gisaid__mutmut_257": 3.328157, + "gisaid_handler.x_submit_gisaid__mutmut_258": 3.453092, + "gisaid_handler.x_submit_gisaid__mutmut_259": 3.482815, + "gisaid_handler.x_submit_gisaid__mutmut_260": 3.521151, + "gisaid_handler.x_submit_gisaid__mutmut_262": 3.508558, + "gisaid_handler.x_submit_gisaid__mutmut_263": 3.543631, + "gisaid_handler.x_submit_gisaid__mutmut_264": 3.656959, + "gisaid_handler.x_submit_gisaid__mutmut_265": 3.693647, + "gisaid_handler.x_submit_gisaid__mutmut_266": 3.746074, + "gisaid_handler.x_submit_gisaid__mutmut_267": 3.659018, + "gisaid_handler.x_submit_gisaid__mutmut_270": 3.54041, + "gisaid_handler.x_submit_gisaid__mutmut_271": 3.54195, + "gisaid_handler.x_submit_gisaid__mutmut_272": 3.542532, + "gisaid_handler.x_submit_gisaid__mutmut_276": 3.478515, + "gisaid_handler.x_submit_gisaid__mutmut_277": 3.51545, + "gisaid_handler.x_submit_gisaid__mutmut_279": 3.508433, + "gisaid_handler.x_submit_gisaid__mutmut_281": 3.547966, + "gisaid_handler.x_submit_gisaid__mutmut_284": 3.397446, + "gisaid_handler.x_submit_gisaid__mutmut_285": 3.522235, + "gisaid_handler.x_submit_gisaid__mutmut_286": 3.543367, + "gisaid_handler.x_submit_gisaid__mutmut_287": 3.535479, + "gisaid_handler.x_submit_gisaid__mutmut_288": 3.538131, + "gisaid_handler.x_submit_gisaid__mutmut_289": 3.538433, + "gisaid_handler.x_submit_gisaid__mutmut_290": 3.541387, + "gisaid_handler.x_submit_gisaid__mutmut_295": 3.533006, + "gisaid_handler.x_submit_gisaid__mutmut_296": 3.584596, + "gisaid_handler.x_submit_gisaid__mutmut_297": 3.609997, + "gisaid_handler.x_submit_gisaid__mutmut_298": 3.574113, + "gisaid_handler.x_submit_gisaid__mutmut_299": 3.602732, + "gisaid_handler.x_submit_gisaid__mutmut_300": 3.507568, + "gisaid_handler.x_submit_gisaid__mutmut_301": 3.532205, + "gisaid_handler.x_submit_gisaid__mutmut_302": 3.530562, + "gisaid_handler.x_submit_gisaid__mutmut_303": 3.529726, + "gisaid_handler.x_submit_gisaid__mutmut_304": 3.559793, + "gisaid_handler.x_submit_gisaid__mutmut_307": 3.549942, + "gisaid_handler.x_submit_gisaid__mutmut_310": 3.507177, + "gisaid_handler.x_submit_gisaid__mutmut_311": 3.527566, + "gisaid_handler.x_submit_gisaid__mutmut_312": 3.82426, + "gisaid_handler.x_submit_gisaid__mutmut_313": 3.777215, + "gisaid_handler.x_submit_gisaid__mutmut_314": 3.715664, + "gisaid_handler.x_submit_gisaid__mutmut_317": 3.558948, + "gisaid_handler.x_submit_gisaid__mutmut_320": 3.528301, + "gisaid_handler.x_submit_gisaid__mutmut_321": 3.519671, + "gisaid_handler.x_submit_gisaid__mutmut_322": 3.51766, + "gisaid_handler.x_submit_gisaid__mutmut_323": 3.546454, + "gisaid_handler.x_submit_gisaid__mutmut_324": 3.561571, + "gisaid_handler.x_submit_gisaid__mutmut_328": 3.626587, + "gisaid_handler.x_submit_gisaid__mutmut_329": 3.672707, + "gisaid_handler.x_submit_gisaid__mutmut_330": 3.628073, + "gisaid_handler.x_submit_gisaid__mutmut_331": 3.554508, + "gisaid_handler.x_submit_gisaid__mutmut_333": 3.443146, + "gisaid_handler.x_submit_gisaid__mutmut_334": 3.430376, + "gisaid_handler.x_submit_gisaid__mutmut_337": 3.399653, + "gisaid_handler.x_submit_gisaid__mutmut_338": 3.401561, + "gisaid_handler.x_submit_gisaid__mutmut_339": 3.402423, + "gisaid_handler.x_submit_gisaid__mutmut_343": 3.421005, + "gisaid_handler.x_submit_gisaid__mutmut_344": 3.447906, + "gisaid_handler.x_submit_gisaid__mutmut_345": 3.484071, + "gisaid_handler.x_submit_gisaid__mutmut_346": 3.52704, + "gisaid_handler.x_submit_gisaid__mutmut_353": 3.280583, + "gisaid_handler.x_submit_gisaid__mutmut_354": 3.336111, + "gisaid_handler.x_submit_gisaid__mutmut_355": 3.339602, + "gisaid_handler.x_submit_gisaid__mutmut_356": 3.31595, + "gisaid_handler.x_submit_gisaid__mutmut_357": 3.324344, + "gisaid_handler.x_submit_gisaid__mutmut_358": 3.33305, + "gisaid_handler.x_submit_gisaid__mutmut_359": 3.318264, + "gisaid_handler.x_submit_gisaid__mutmut_362": 3.301739, + "gisaid_handler.x_submit_gisaid__mutmut_363": 3.254995, + "gisaid_handler.x_submit_gisaid__mutmut_364": 3.220624, + "gisaid_handler.x_submit_gisaid__mutmut_365": 3.183622, + "gisaid_handler.x_submit_gisaid__mutmut_366": 3.217691, + "gisaid_handler.x_submit_gisaid__mutmut_367": 3.302036, + "gisaid_handler.x_submit_gisaid__mutmut_368": 3.372757, + "gisaid_handler.x_submit_gisaid__mutmut_369": 3.37094, + "gisaid_handler.x_submit_gisaid__mutmut_370": 3.372627, + "gisaid_handler.x_submit_gisaid__mutmut_371": 3.355868, + "gisaid_handler.x_submit_gisaid__mutmut_372": 3.364684, + "gisaid_handler.x_submit_gisaid__mutmut_375": 3.338836, + "gisaid_handler.x_submit_gisaid__mutmut_376": 3.31602, + "gisaid_handler.x_submit_gisaid__mutmut_377": 3.286804, + "gisaid_handler.x_submit_gisaid__mutmut_378": 3.297318, + "gisaid_handler.x_submit_gisaid__mutmut_379": 3.325518, + "gisaid_handler.x_submit_gisaid__mutmut_380": 3.35336, + "gisaid_handler.x_submit_gisaid__mutmut_381": 3.357624, + "gisaid_handler.x_submit_gisaid__mutmut_382": 3.373194, + "gisaid_handler.x_submit_gisaid__mutmut_383": 3.36395, + "gisaid_handler.x_submit_gisaid__mutmut_172": 3.647182, + "gisaid_handler.x_create_gisaid_files__mutmut_108": 3.471161, + "gisaid_handler.x_submit_gisaid__mutmut_144": 3.053733, + "gisaid_handler.x_submit_gisaid__mutmut_280": 3.515696, + "gisaid_handler.x_process_flu_dates__mutmut_2": 3.122282, + "gisaid_handler.x_process_flu_dates__mutmut_3": 3.196, + "gisaid_handler.x_process_flu_dates__mutmut_4": 3.2765, + "gisaid_handler.x_process_flu_dates__mutmut_5": 3.325966, + "gisaid_handler.x_process_flu_dates__mutmut_6": 3.325901, + "gisaid_handler.x_process_flu_dates__mutmut_7": 3.324739, + "gisaid_handler.x_process_flu_dates__mutmut_8": 3.324261, + "gisaid_handler.x_process_flu_dates__mutmut_9": 3.326285, + "gisaid_handler.x_process_flu_dates__mutmut_10": 3.27131, + "gisaid_handler.x_process_flu_dates__mutmut_11": 3.221136, + "gisaid_handler.x_process_flu_dates__mutmut_12": 3.154735, + "gisaid_handler.x_process_flu_dates__mutmut_13": 3.359779, + "gisaid_handler.x_process_flu_dates__mutmut_14": 3.362367, + "gisaid_handler.x_process_flu_dates__mutmut_15": 3.355483, + "gisaid_handler.x_process_flu_dates__mutmut_16": 3.326908, + "gisaid_handler.x_process_flu_dates__mutmut_17": 3.363423, + "gisaid_handler.x_process_flu_dates__mutmut_18": 3.380708, + "gisaid_handler.x_process_flu_dates__mutmut_19": 3.387891, + "gisaid_handler.x_process_flu_dates__mutmut_20": 3.406349, + "gisaid_handler.x_process_flu_dates__mutmut_21": 3.415989, + "gisaid_handler.x_process_flu_dates__mutmut_22": 3.458974, + "gisaid_handler.x_process_flu_dates__mutmut_23": 3.513126, + "gisaid_handler.x_process_flu_dates__mutmut_24": 3.523971, + "gisaid_handler.x_process_flu_dates__mutmut_25": 3.515454, + "gisaid_handler.x_process_flu_dates__mutmut_26": 3.432966, + "gisaid_handler.x_process_flu_dates__mutmut_27": 3.449958, + "gisaid_handler.x_process_flu_dates__mutmut_28": 3.464496, + "gisaid_handler.x_process_flu_dates__mutmut_29": 3.500635, + "gisaid_handler.x_process_flu_dates__mutmut_30": 3.555014, + "gisaid_handler.x_process_flu_dates__mutmut_31": 3.623417, + "gisaid_handler.x_process_flu_dates__mutmut_32": 3.753514, + "gisaid_handler.x_process_flu_dates__mutmut_33": 3.839264 + }, + "type_check_error_by_key": { + "gisaid_handler.x_update_gisaid_files__mutmut_1": "Value of type \"None\" is not indexable", + "gisaid_handler.x_update_gisaid_files__mutmut_2": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_8": "No overload variant of \"read_csv\" matches argument types \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_15": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_16": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_20": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_21": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_22": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_28": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_29": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_34": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_35": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_36": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_41": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_42": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_43": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_48": "Value of type \"None\" is not indexable", + "gisaid_handler.x_update_gisaid_files__mutmut_49": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_update_gisaid_files__mutmut_51": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_update_gisaid_files__mutmut_58": "\"None\" has no attribute \"merge\"", + "gisaid_handler.x_update_gisaid_files__mutmut_59": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_65": "No overload variant of \"read_csv\" matches argument types \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_72": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_73": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_87": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"DataFrame | None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_update_gisaid_files__mutmut_101": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"DataFrame | None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_update_gisaid_files__mutmut_105": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_update_gisaid_files__mutmut_112": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"DataFrame | None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_update_gisaid_files__mutmut_115": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_update_gisaid_files__mutmut_116": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_update_gisaid_files__mutmut_117": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_update_gisaid_files__mutmut_120": "Missing positional argument \"right\" in call to \"merge\" of \"DataFrame\"", + "gisaid_handler.x_update_gisaid_files__mutmut_124": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['XXinnerXX']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_update_gisaid_files__mutmut_125": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['INNER']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_update_gisaid_files__mutmut_128": "Unsupported right operand type for in (\"None\")", + "gisaid_handler.x_update_gisaid_files__mutmut_129": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_update_gisaid_files__mutmut_131": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_132": "No overload variant of \"drop\" of \"NDFrame\" matches argument type \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_138": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_139": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_141": "No overload variant of \"to_csv\" of \"NDFrame\" matches argument types \"str\", \"None\", \"bool\"", + "gisaid_handler.x_update_gisaid_files__mutmut_142": "No overload variant of \"to_csv\" of \"NDFrame\" matches argument types \"str\", \"bool\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_148": "Argument 1 to \"write\" has incompatible type \"None\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_update_gisaid_files__mutmut_149": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_150": "No overload variant of \"open\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_155": "\"None\" has no attribute \"__iter__\" (not iterable)", + "gisaid_handler.x_update_gisaid_files__mutmut_158": "Missing positional argument \"format\" in call to \"parse\"", + "gisaid_handler.x_update_gisaid_files__mutmut_159": "Missing positional argument \"format\" in call to \"parse\"", + "gisaid_handler.x_update_gisaid_files__mutmut_163": "Need type annotation for \"fasta_dict\" (hint: \"fasta_dict: list[] = ...\")", + "gisaid_handler.x_update_gisaid_files__mutmut_164": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_165": "No overload variant of \"open\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_update_gisaid_files__mutmut_170": "Argument 1 to \"write\" has incompatible type \"None\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_update_gisaid_files__mutmut_171": "Argument 2 to \"write\" has incompatible type \"None\"; expected \"IO[str] | PathLike[Any] | str | bytes\"", + "gisaid_handler.x_update_gisaid_files__mutmut_172": "Argument 3 to \"write\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_update_gisaid_files__mutmut_173": "Argument 1 to \"write\" has incompatible type \"TextIOWrapper[_WrappedBuffer]\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_update_gisaid_files__mutmut_174": "Missing positional argument \"format\" in call to \"write\"", + "gisaid_handler.x_update_gisaid_files__mutmut_175": "Missing positional argument \"format\" in call to \"write\"", + "gisaid_handler.x_process_gisaid_log__mutmut_1": "Argument \"file_type\" to \"validate_file\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_2": "Argument \"file_path\" to \"validate_file\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_3": "Missing positional argument \"file_type\" in call to \"validate_file\"", + "gisaid_handler.x_process_gisaid_log__mutmut_4": "Missing positional argument \"file_path\" in call to \"validate_file\"", + "gisaid_handler.x_process_gisaid_log__mutmut_8": "\"None\" has no attribute \"append\"", + "gisaid_handler.x_process_gisaid_log__mutmut_9": "\"None\" has no attribute \"append\"", + "gisaid_handler.x_process_gisaid_log__mutmut_10": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_11": "No overload variant of \"open\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_16": "Need type annotation for \"gisaid_segment_log\" (hint: \"gisaid_segment_log: list[] = ...\")", + "gisaid_handler.x_process_gisaid_log__mutmut_17": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_18": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_19": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_20": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_24": "Argument 1 to \"join\" of \"str\" has incompatible type \"None\"; expected \"Iterable[str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_25": "No overload variant of \"findall\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_26": "No overload variant of \"findall\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_27": "No overload variant of \"findall\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_28": "No overload variant of \"findall\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_32": "\"None\" has no attribute \"split\"", + "gisaid_handler.x_process_gisaid_log__mutmut_33": "Argument 1 to \"join\" of \"str\" has incompatible type \"None\"; expected \"Iterable[str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_35": "Incompatible types in assignment (expression has type \"None\", variable has type \"list[str]\")", + "gisaid_handler.x_process_gisaid_log__mutmut_40": "No overload variant of \"match\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_42": "No overload variant of \"match\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_43": "No overload variant of \"match\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_44": "No overload variant of \"match\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_45": "No overload variant of \"match\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_48": "Argument 1 to \"append\" of \"list\" has incompatible type \"None\"; expected \"dict[str, str | Any]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_53": "No overload variant of \"match\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_54": "No overload variant of \"match\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_55": "No overload variant of \"match\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_56": "No overload variant of \"match\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_59": "Argument 1 to \"append\" of \"list\" has incompatible type \"None\"; expected \"dict[str, str | Any]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_64": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_65": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_66": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_67": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_71": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_72": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_73": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_74": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_78": "Dict entry 0 has incompatible type \"str\": \"None\"; expected \"str\": \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_79": "No overload variant of \"group\" of \"Match\" matches argument type \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_81": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_82": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_83": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_84": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_88": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_89": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_90": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_91": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_94": "Dict entry 1 has incompatible type \"str\": \"str | None\"; expected \"str\": \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_95": "No overload variant of \"group\" of \"Match\" matches argument type \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_97": "Dict entry 1 has incompatible type \"str\": \"str | Any | None\"; expected \"str\": \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_99": "Argument 1 to \"append\" of \"list\" has incompatible type \"None\"; expected \"dict[str, str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_104": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_105": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_106": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_107": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_111": "No overload variant of \"search\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_112": "No overload variant of \"search\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_113": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_114": "No overload variant of \"search\" matches argument type \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_117": "Dict entry 1 has incompatible type \"str\": \"str | None\"; expected \"str\": \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_118": "No overload variant of \"group\" of \"Match\" matches argument type \"None\"", + "gisaid_handler.x_process_gisaid_log__mutmut_120": "Dict entry 1 has incompatible type \"str\": \"str | Any | None\"; expected \"str\": \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_122": "Argument 1 to \"append\" of \"list\" has incompatible type \"None\"; expected \"dict[str, str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_131": "Incompatible types in assignment (expression has type \"None\", variable has type \"str\")", + "gisaid_handler.x_process_gisaid_log__mutmut_132": "Value of type \"None\" is not indexable", + "gisaid_handler.x_process_gisaid_log__mutmut_134": "Argument \"update_df\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_process_gisaid_log__mutmut_143": "Argument \"submission_dir\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_144": "Argument \"update_database\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_145": "Argument \"update_df\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_process_gisaid_log__mutmut_146": "Missing positional argument \"submission_dir\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_147": "Missing positional argument \"update_database\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_148": "Missing positional argument \"update_df\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_151": "Argument \"submission_dir\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_152": "Argument \"update_database\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_153": "Argument \"update_df\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_process_gisaid_log__mutmut_154": "Missing positional argument \"submission_dir\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_155": "Missing positional argument \"update_database\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_156": "Missing positional argument \"update_df\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_164": "Argument \"submission_dir\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_165": "Argument \"update_database\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_166": "Argument \"update_df\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_process_gisaid_log__mutmut_167": "Missing positional argument \"submission_dir\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_168": "Missing positional argument \"update_database\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_169": "Missing positional argument \"update_df\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_177": "Argument \"submission_dir\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_178": "Argument \"update_database\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_process_gisaid_log__mutmut_179": "Argument \"update_df\" to \"update_submission_status_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_process_gisaid_log__mutmut_180": "Missing positional argument \"submission_dir\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_181": "Missing positional argument \"update_database\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_182": "Missing positional argument \"update_df\" in call to \"update_submission_status_csv\"", + "gisaid_handler.x_process_gisaid_log__mutmut_189": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_process_gisaid_log__mutmut_191": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_192": "Argument \"regex\" to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"bool\"", + "gisaid_handler.x_process_gisaid_log__mutmut_194": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_process_gisaid_log__mutmut_203": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_process_gisaid_log__mutmut_205": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_process_gisaid_log__mutmut_206": "Argument \"regex\" to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"bool\"", + "gisaid_handler.x_process_gisaid_log__mutmut_208": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_create_gisaid_files__mutmut_1": "Value of type \"Any | None\" is not indexable", + "gisaid_handler.x_create_gisaid_files__mutmut_3": "Incompatible types in assignment (expression has type \"None\", variable has type \"Index[str]\")", + "gisaid_handler.x_create_gisaid_files__mutmut_4": "Argument 1 to \"replace\" of \"StringMethods\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_5": "Argument 2 to \"replace\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Callable[[Match[str]], str]\"", + "gisaid_handler.x_create_gisaid_files__mutmut_6": "Missing positional argument \"repl\" in call to \"replace\" of \"StringMethods\"", + "gisaid_handler.x_create_gisaid_files__mutmut_7": "Missing positional argument \"repl\" in call to \"replace\" of \"StringMethods\"", + "gisaid_handler.x_create_gisaid_files__mutmut_23": "Unsupported operand types for + (\"list[str | None]\" and \"list[str]\")", + "gisaid_handler.x_create_gisaid_files__mutmut_32": "Unsupported operand types for + (\"list[str | None]\" and \"list[str]\")", + "gisaid_handler.x_create_gisaid_files__mutmut_33": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_create_gisaid_files__mutmut_38": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_create_gisaid_files__mutmut_43": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_create_gisaid_files__mutmut_47": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_62": "Unsupported left operand type for + (\"None\")", + "gisaid_handler.x_create_gisaid_files__mutmut_70": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_93": "No overload variant of \"apply\" of \"Series\" matches argument type \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_114": "No overload variant of \"astype\" of \"Series\" matches argument type \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_118": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_create_gisaid_files__mutmut_132": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_140": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_141": "No overload variant of \"drop_duplicates\" of \"DataFrame\" matches argument type \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_142": "No overload variant of \"drop_duplicates\" of \"DataFrame\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_143": "No overload variant of \"drop_duplicates\" of \"DataFrame\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_144": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_145": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_create_gisaid_files__mutmut_147": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_create_gisaid_files__mutmut_149": "Missing positional argument \"right\" in call to \"merge\" of \"DataFrame\"", + "gisaid_handler.x_create_gisaid_files__mutmut_156": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['XXinnerXX']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_create_gisaid_files__mutmut_157": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['INNER']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_create_gisaid_files__mutmut_158": "Argument \"validate\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['XX1:1XX']\"; expected \"Literal['one_to_one', '1:1', 'one_to_many', '1:m', 'many_to_one', 'm:1', 'many_to_many', 'm:m'] | None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_159": "Unsupported left operand type for + (\"None\")", + "gisaid_handler.x_create_gisaid_files__mutmut_169": "No overload variant of \"__add__\" of \"list\" matches argument type \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_171": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_create_gisaid_files__mutmut_172": "Unsupported left operand type for - (\"list[str]\")", + "gisaid_handler.x_create_gisaid_files__mutmut_173": "Argument \"df\" to \"save_csv\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_create_gisaid_files__mutmut_174": "Argument \"file_path\" to \"save_csv\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_176": "Missing positional argument \"df\" in call to \"save_csv\"", + "gisaid_handler.x_create_gisaid_files__mutmut_177": "Missing positional argument \"file_path\" in call to \"save_csv\"", + "gisaid_handler.x_create_gisaid_files__mutmut_181": "No overload variant of \"copy\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_182": "No overload variant of \"copy\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_183": "No overload variant of \"copy\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_184": "No overload variant of \"copy\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_185": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_186": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_191": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_192": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_197": "Argument \"database\" to \"create_fasta\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_198": "Argument \"metadata\" to \"create_fasta\" has incompatible type \"None\"; expected \"DataFrame\"", + "gisaid_handler.x_create_gisaid_files__mutmut_199": "Argument \"submission_dir\" to \"create_fasta\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_200": "Argument \"config_dict\" to \"create_fasta\" has incompatible type \"None\"; expected \"dict[str, Any]\"", + "gisaid_handler.x_create_gisaid_files__mutmut_201": "Missing positional argument \"database\" in call to \"create_fasta\"", + "gisaid_handler.x_create_gisaid_files__mutmut_202": "Missing positional argument \"metadata\" in call to \"create_fasta\"", + "gisaid_handler.x_create_gisaid_files__mutmut_203": "Missing positional argument \"submission_dir\" in call to \"create_fasta\"", + "gisaid_handler.x_create_gisaid_files__mutmut_204": "Missing positional argument \"config_dict\" in call to \"create_fasta\"", + "gisaid_handler.x_create_gisaid_files__mutmut_207": "No overload variant of \"copy\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_208": "No overload variant of \"copy\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_209": "No overload variant of \"copy\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_210": "No overload variant of \"copy\" matches argument type \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_211": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_212": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_create_gisaid_files__mutmut_217": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_create_gisaid_files__mutmut_218": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_1": "List item 9 has incompatible type \"str | None\"; expected \"str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_2": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_3": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_8": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_9": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_10": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_15": "List item 11 has incompatible type \"str | None\"; expected \"str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_16": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_17": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_22": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_23": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_24": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_29": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_30": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_31": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_34": "No overload variant of \"dirname\" matches argument type \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_37": "Argument \"config_dict\" to \"check_credentials\" has incompatible type \"None\"; expected \"dict[str, Any]\"", + "gisaid_handler.x_submit_gisaid__mutmut_38": "Argument \"database\" to \"check_credentials\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_39": "Missing positional argument \"config_dict\" in call to \"check_credentials\"", + "gisaid_handler.x_submit_gisaid__mutmut_40": "Missing positional argument \"database\" in call to \"check_credentials\"", + "gisaid_handler.x_submit_gisaid__mutmut_43": "List item 0 has incompatible type \"None\"; expected \"str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_44": "Argument \"submission_dir\" to \"validate_gisaid_installer\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_45": "Argument \"organism\" to \"validate_gisaid_installer\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_46": "Argument \"config_dict\" to \"validate_gisaid_installer\" has incompatible type \"None\"; expected \"dict[str, Any]\"", + "gisaid_handler.x_submit_gisaid__mutmut_47": "Missing positional argument \"submission_dir\" in call to \"validate_gisaid_installer\"", + "gisaid_handler.x_submit_gisaid__mutmut_48": "Missing positional argument \"organism\" in call to \"validate_gisaid_installer\"", + "gisaid_handler.x_submit_gisaid__mutmut_49": "Missing positional argument \"config_dict\" in call to \"validate_gisaid_installer\"", + "gisaid_handler.x_submit_gisaid__mutmut_51": "Argument 1 to \"sleep\" has incompatible type \"None\"; expected \"float\"", + "gisaid_handler.x_submit_gisaid__mutmut_53": "Unsupported operand types for + (\"None\" and \"int\")", + "gisaid_handler.x_submit_gisaid__mutmut_61": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_62": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_68": "Argument \"log_file\" to \"process_gisaid_log\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_69": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_70": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_73": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_74": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_80": "Argument 1 to \"isfile\" has incompatible type \"None\"; expected \"int | str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_83": "Argument 1 to \"remove\" has incompatible type \"None\"; expected \"str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_84": "\"None\" has no attribute \"stderr\"", + "gisaid_handler.x_submit_gisaid__mutmut_85": "No overload variant of \"run\" matches argument types \"None\", \"str\", \"int\", \"int\"", + "gisaid_handler.x_submit_gisaid__mutmut_89": "No overload variant of \"run\" matches argument types \"str\", \"int\", \"int\"", + "gisaid_handler.x_submit_gisaid__mutmut_132": "Argument 1 to \"exists\" has incompatible type \"None\"; expected \"int | str | bytes | PathLike[str] | PathLike[bytes]\"", + "gisaid_handler.x_submit_gisaid__mutmut_133": "Argument 1 to \"sleep\" has incompatible type \"None\"; expected \"float\"", + "gisaid_handler.x_submit_gisaid__mutmut_135": "Argument \"log_file\" to \"process_gisaid_log\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_136": "Argument \"submission_dir\" to \"process_gisaid_log\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_137": "Missing positional argument \"log_file\" in call to \"process_gisaid_log\"", + "gisaid_handler.x_submit_gisaid__mutmut_138": "Missing positional argument \"submission_dir\" in call to \"process_gisaid_log\"", + "gisaid_handler.x_submit_gisaid__mutmut_139": "Value of type \"None\" is not indexable", + "gisaid_handler.x_submit_gisaid__mutmut_140": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_146": "No overload variant of \"read_csv\" matches argument types \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_153": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_154": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_158": "Incompatible types in assignment (expression has type \"None\", variable has type \"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_159": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_160": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_165": "Incompatible types in assignment (expression has type \"None\", variable has type \"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_166": "No overload variant of \"join\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_167": "No overload variant of \"join\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_182": "Value of type \"None\" is not indexable", + "gisaid_handler.x_submit_gisaid__mutmut_185": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_submit_gisaid__mutmut_187": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_submit_gisaid__mutmut_195": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_submit_gisaid__mutmut_197": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_submit_gisaid__mutmut_204": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_submit_gisaid__mutmut_218": "Value of type \"None\" is not indexable", + "gisaid_handler.x_submit_gisaid__mutmut_220": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_submit_gisaid__mutmut_222": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_submit_gisaid__mutmut_233": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_240": "Value of type \"None\" is not indexable", + "gisaid_handler.x_submit_gisaid__mutmut_242": "Argument 1 to \"contains\" of \"StringMethods\" has incompatible type \"None\"; expected \"str | Pattern[str]\"", + "gisaid_handler.x_submit_gisaid__mutmut_244": "Missing positional argument \"pat\" in call to \"contains\" of \"StringMethods\"", + "gisaid_handler.x_submit_gisaid__mutmut_254": "Item \"None\" of \"Any | None\" has no attribute \"index\"", + "gisaid_handler.x_submit_gisaid__mutmut_255": "No overload variant of \"read_csv\" matches argument types \"None\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_261": "No overload variant of \"read_csv\" matches argument types \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_268": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_269": "No overload variant of \"read_csv\" matches argument types \"str\", \"int\", \"type[str]\", \"str\", \"str\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_273": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_submit_gisaid__mutmut_274": "Argument 1 to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"DataFrame | Series[Any]\"", + "gisaid_handler.x_submit_gisaid__mutmut_275": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"None\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_submit_gisaid__mutmut_278": "Missing positional argument \"right\" in call to \"merge\" of \"DataFrame\"", + "gisaid_handler.x_submit_gisaid__mutmut_282": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['XXinnerXX']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_submit_gisaid__mutmut_283": "Argument \"how\" to \"merge\" of \"DataFrame\" has incompatible type \"Literal['INNER']\"; expected \"Literal['cross', 'left_anti', 'right_anti'] | Literal['left', 'right', 'outer', 'inner']\"", + "gisaid_handler.x_submit_gisaid__mutmut_291": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_292": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_293": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_294": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_305": "Unsupported right operand type for in (\"None\")", + "gisaid_handler.x_submit_gisaid__mutmut_306": "Incompatible types in assignment (expression has type \"None\", variable has type \"DataFrame\")", + "gisaid_handler.x_submit_gisaid__mutmut_308": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_309": "No overload variant of \"drop\" of \"NDFrame\" matches argument type \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_315": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_316": "No overload variant of \"drop\" of \"NDFrame\" matches argument types \"list[str]\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_318": "No overload variant of \"to_csv\" of \"NDFrame\" matches argument types \"str\", \"None\", \"bool\"", + "gisaid_handler.x_submit_gisaid__mutmut_319": "No overload variant of \"to_csv\" of \"NDFrame\" matches argument types \"str\", \"bool\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_325": "Argument 1 to \"write\" has incompatible type \"None\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_submit_gisaid__mutmut_326": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_327": "No overload variant of \"open\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_332": "\"None\" has no attribute \"__iter__\" (not iterable)", + "gisaid_handler.x_submit_gisaid__mutmut_335": "Missing positional argument \"format\" in call to \"parse\"", + "gisaid_handler.x_submit_gisaid__mutmut_336": "Missing positional argument \"format\" in call to \"parse\"", + "gisaid_handler.x_submit_gisaid__mutmut_340": "Need type annotation for \"fasta_dict\" (hint: \"fasta_dict: list[] = ...\")", + "gisaid_handler.x_submit_gisaid__mutmut_341": "No overload variant of \"open\" matches argument types \"None\", \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_342": "No overload variant of \"open\" matches argument types \"str\", \"None\"", + "gisaid_handler.x_submit_gisaid__mutmut_347": "Argument 1 to \"write\" has incompatible type \"None\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_submit_gisaid__mutmut_348": "Argument 2 to \"write\" has incompatible type \"None\"; expected \"IO[str] | PathLike[Any] | str | bytes\"", + "gisaid_handler.x_submit_gisaid__mutmut_349": "Argument 3 to \"write\" has incompatible type \"None\"; expected \"str\"", + "gisaid_handler.x_submit_gisaid__mutmut_350": "Argument 1 to \"write\" has incompatible type \"TextIOWrapper[_WrappedBuffer]\"; expected \"Iterable[SeqRecord] | SeqRecord\"", + "gisaid_handler.x_submit_gisaid__mutmut_351": "Missing positional argument \"format\" in call to \"write\"", + "gisaid_handler.x_submit_gisaid__mutmut_352": "Missing positional argument \"format\" in call to \"write\"", + "gisaid_handler.x_submit_gisaid__mutmut_360": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_361": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_373": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_submit_gisaid__mutmut_374": "Unsupported left operand type for - (\"str\")", + "gisaid_handler.x_process_flu_dates__mutmut_1": "Argument 1 to \"len\" has incompatible type \"None\"; expected \"Sized\"" + }, + "estimated_durations_by_key": { + "gisaid_handler.x_update_gisaid_files__mutmut_1": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_2": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_3": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_4": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_5": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_6": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_7": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_8": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_9": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_10": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_11": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_12": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_13": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_14": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_15": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_16": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_17": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_18": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_19": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_20": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_21": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_22": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_23": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_24": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_25": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_26": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_27": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_28": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_29": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_30": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_31": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_32": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_33": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_34": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_35": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_36": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_37": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_38": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_39": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_40": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_41": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_42": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_43": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_44": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_45": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_46": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_47": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_48": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_49": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_50": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_51": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_52": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_53": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_54": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_55": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_56": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_57": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_58": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_59": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_60": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_61": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_62": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_63": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_64": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_65": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_66": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_67": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_68": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_69": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_70": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_71": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_72": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_73": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_74": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_75": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_76": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_77": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_78": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_79": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_80": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_81": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_82": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_83": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_84": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_85": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_86": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_87": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_88": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_89": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_90": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_91": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_92": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_93": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_94": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_95": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_96": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_97": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_98": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_99": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_100": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_101": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_102": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_103": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_104": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_105": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_106": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_107": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_108": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_109": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_110": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_111": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_112": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_113": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_114": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_115": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_116": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_117": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_118": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_119": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_120": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_121": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_122": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_123": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_124": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_125": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_126": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_127": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_128": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_129": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_130": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_131": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_132": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_133": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_134": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_135": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_136": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_137": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_138": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_139": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_140": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_141": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_142": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_143": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_144": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_145": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_146": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_147": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_148": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_149": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_150": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_151": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_152": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_153": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_154": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_155": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_156": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_157": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_158": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_159": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_160": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_161": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_162": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_163": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_164": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_165": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_166": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_167": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_168": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_169": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_170": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_171": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_172": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_173": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_174": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_175": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_176": 0.14834927255287766, + "gisaid_handler.x_update_gisaid_files__mutmut_177": 0.14834927255287766, + "gisaid_handler.x_process_gisaid_log__mutmut_1": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_2": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_3": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_4": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_5": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_6": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_7": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_8": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_9": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_10": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_11": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_12": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_13": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_14": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_15": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_16": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_17": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_18": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_19": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_20": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_21": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_22": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_23": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_24": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_25": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_26": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_27": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_28": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_29": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_30": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_31": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_32": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_33": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_34": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_35": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_36": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_37": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_38": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_39": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_40": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_41": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_42": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_43": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_44": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_45": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_46": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_47": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_48": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_49": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_50": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_51": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_52": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_53": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_54": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_55": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_56": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_57": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_58": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_59": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_60": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_61": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_62": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_63": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_64": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_65": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_66": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_67": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_68": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_69": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_70": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_71": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_72": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_73": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_74": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_75": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_76": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_77": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_78": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_79": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_80": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_81": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_82": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_83": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_84": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_85": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_86": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_87": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_88": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_89": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_90": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_91": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_92": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_93": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_94": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_95": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_96": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_97": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_98": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_99": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_100": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_101": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_102": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_103": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_104": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_105": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_106": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_107": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_108": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_109": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_110": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_111": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_112": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_113": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_114": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_115": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_116": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_117": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_118": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_119": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_120": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_121": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_122": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_123": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_124": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_125": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_126": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_127": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_128": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_129": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_130": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_131": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_132": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_133": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_134": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_135": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_136": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_137": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_138": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_139": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_140": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_141": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_142": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_143": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_144": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_145": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_146": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_147": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_148": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_149": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_150": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_151": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_152": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_153": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_154": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_155": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_156": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_157": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_158": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_159": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_160": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_161": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_162": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_163": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_164": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_165": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_166": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_167": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_168": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_169": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_170": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_171": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_172": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_173": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_174": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_175": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_176": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_177": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_178": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_179": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_180": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_181": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_182": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_183": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_184": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_185": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_186": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_187": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_188": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_189": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_190": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_191": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_192": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_193": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_194": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_195": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_196": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_197": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_198": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_199": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_200": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_201": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_202": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_203": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_204": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_205": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_206": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_207": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_208": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_209": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_210": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_211": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_212": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_213": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_214": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_215": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_216": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_217": 0.16324700880795717, + "gisaid_handler.x_process_gisaid_log__mutmut_218": 0.16324700880795717, + "gisaid_handler.x_create_gisaid_files__mutmut_1": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_2": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_3": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_4": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_5": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_6": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_7": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_8": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_9": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_10": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_11": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_12": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_13": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_14": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_15": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_16": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_17": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_18": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_19": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_20": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_21": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_22": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_23": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_24": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_25": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_26": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_27": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_28": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_29": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_30": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_31": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_32": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_33": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_34": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_35": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_36": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_37": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_38": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_39": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_40": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_41": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_42": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_43": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_44": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_45": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_46": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_47": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_48": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_49": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_50": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_51": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_52": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_53": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_54": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_55": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_56": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_57": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_58": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_59": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_60": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_61": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_62": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_63": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_64": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_65": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_66": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_67": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_68": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_69": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_70": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_71": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_72": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_73": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_74": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_75": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_76": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_77": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_78": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_79": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_80": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_81": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_82": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_83": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_84": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_85": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_86": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_87": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_88": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_89": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_90": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_91": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_92": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_93": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_94": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_95": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_96": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_97": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_98": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_99": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_100": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_101": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_102": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_103": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_104": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_105": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_106": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_107": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_108": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_109": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_110": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_111": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_112": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_113": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_114": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_115": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_116": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_117": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_118": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_119": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_120": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_121": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_122": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_123": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_124": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_125": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_126": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_127": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_128": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_129": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_130": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_131": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_132": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_133": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_134": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_135": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_136": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_137": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_138": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_139": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_140": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_141": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_142": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_143": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_144": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_145": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_146": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_147": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_148": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_149": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_150": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_151": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_152": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_153": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_154": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_155": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_156": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_157": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_158": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_159": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_160": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_161": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_162": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_163": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_164": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_165": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_166": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_167": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_168": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_169": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_170": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_171": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_172": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_173": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_174": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_175": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_176": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_177": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_178": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_179": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_180": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_181": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_182": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_183": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_184": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_185": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_186": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_187": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_188": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_189": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_190": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_191": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_192": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_193": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_194": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_195": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_196": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_197": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_198": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_199": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_200": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_201": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_202": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_203": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_204": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_205": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_206": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_207": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_208": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_209": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_210": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_211": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_212": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_213": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_214": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_215": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_216": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_217": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_218": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_219": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_220": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_221": 0.1644633118994534, + "gisaid_handler.x_create_gisaid_files__mutmut_222": 0.1644633118994534, + "gisaid_handler.x_submit_gisaid__mutmut_1": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_2": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_3": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_4": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_5": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_6": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_7": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_8": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_9": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_10": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_11": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_12": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_13": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_14": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_15": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_16": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_17": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_18": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_19": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_20": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_21": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_22": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_23": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_24": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_25": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_26": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_27": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_28": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_29": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_30": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_31": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_32": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_33": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_34": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_35": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_36": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_37": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_38": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_39": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_40": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_41": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_42": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_43": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_44": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_45": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_46": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_47": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_48": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_49": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_50": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_51": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_52": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_53": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_54": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_55": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_56": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_57": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_58": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_59": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_60": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_61": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_62": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_63": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_64": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_65": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_66": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_67": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_68": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_69": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_70": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_71": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_72": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_73": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_74": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_75": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_76": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_77": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_78": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_79": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_80": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_81": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_82": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_83": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_84": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_85": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_86": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_87": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_88": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_89": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_90": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_91": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_92": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_93": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_94": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_95": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_96": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_97": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_98": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_99": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_100": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_101": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_102": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_103": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_104": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_105": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_106": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_107": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_108": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_109": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_110": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_111": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_112": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_113": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_114": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_115": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_116": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_117": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_118": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_119": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_120": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_121": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_122": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_123": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_124": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_125": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_126": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_127": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_128": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_129": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_130": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_131": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_132": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_133": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_134": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_135": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_136": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_137": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_138": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_139": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_140": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_141": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_142": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_143": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_144": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_145": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_146": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_147": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_148": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_149": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_150": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_151": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_152": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_153": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_154": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_155": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_156": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_157": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_158": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_159": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_160": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_161": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_162": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_163": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_164": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_165": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_166": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_167": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_168": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_169": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_170": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_171": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_172": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_173": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_174": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_175": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_176": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_177": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_178": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_179": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_180": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_181": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_182": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_183": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_184": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_185": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_186": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_187": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_188": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_189": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_190": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_191": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_192": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_193": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_194": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_195": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_196": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_197": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_198": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_199": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_200": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_201": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_202": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_203": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_204": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_205": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_206": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_207": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_208": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_209": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_210": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_211": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_212": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_213": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_214": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_215": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_216": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_217": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_218": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_219": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_220": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_221": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_222": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_223": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_224": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_225": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_226": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_227": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_228": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_229": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_230": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_231": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_232": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_233": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_234": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_235": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_236": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_237": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_238": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_239": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_240": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_241": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_242": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_243": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_244": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_245": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_246": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_247": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_248": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_249": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_250": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_251": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_252": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_253": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_254": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_255": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_256": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_257": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_258": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_259": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_260": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_261": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_262": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_263": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_264": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_265": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_266": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_267": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_268": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_269": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_270": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_271": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_272": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_273": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_274": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_275": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_276": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_277": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_278": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_279": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_280": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_281": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_282": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_283": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_284": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_285": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_286": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_287": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_288": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_289": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_290": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_291": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_292": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_293": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_294": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_295": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_296": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_297": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_298": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_299": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_300": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_301": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_302": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_303": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_304": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_305": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_306": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_307": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_308": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_309": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_310": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_311": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_312": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_313": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_314": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_315": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_316": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_317": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_318": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_319": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_320": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_321": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_322": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_323": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_324": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_325": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_326": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_327": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_328": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_329": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_330": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_331": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_332": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_333": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_334": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_335": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_336": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_337": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_338": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_339": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_340": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_341": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_342": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_343": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_344": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_345": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_346": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_347": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_348": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_349": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_350": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_351": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_352": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_353": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_354": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_355": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_356": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_357": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_358": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_359": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_360": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_361": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_362": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_363": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_364": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_365": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_366": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_367": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_368": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_369": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_370": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_371": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_372": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_373": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_374": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_375": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_376": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_377": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_378": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_379": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_380": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_381": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_382": 0.3278739769011736, + "gisaid_handler.x_submit_gisaid__mutmut_383": 0.3278739769011736, + "gisaid_handler.x_process_flu_dates__mutmut_1": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_2": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_3": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_4": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_5": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_6": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_7": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_8": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_9": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_10": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_11": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_12": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_13": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_14": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_15": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_16": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_17": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_18": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_19": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_20": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_21": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_22": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_23": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_24": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_25": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_26": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_27": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_28": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_29": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_30": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_31": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_32": 1.1363291349262, + "gisaid_handler.x_process_flu_dates__mutmut_33": 1.1363291349262 + } +} \ No newline at end of file diff --git a/mutants/sub1.zip b/mutants/sub1.zip deleted file mode 100644 index 925a9aa..0000000 Binary files a/mutants/sub1.zip and /dev/null differ diff --git a/mutants/tests/unit/test_gisaid_handler.py b/mutants/tests/unit/test_gisaid_handler.py new file mode 100644 index 0000000..0b7c322 --- /dev/null +++ b/mutants/tests/unit/test_gisaid_handler.py @@ -0,0 +1,1891 @@ +from __future__ import annotations + +import importlib.util +import sys +import types +from pathlib import Path +import os +import pandas as pd +import pytest +from Bio import SeqIO +from Bio.Seq import Seq +from Bio.SeqRecord import SeqRecord +from typing import Any + +def _source_root() -> Path: + here = Path(__file__).resolve() + for parent in here.parents: + # During mutmut, prefer the mutated source tree. + mutant_src = parent / "src" + if parent.name == "mutants" and (mutant_src / "gisaid_handler.py").exists(): + return mutant_src + + # Normal pytest run. + normal_src = parent / "src" + if (normal_src / "gisaid_handler.py").exists() and parent.name != "mutants": + return normal_src + + raise RuntimeError("Could not find src/gisaid_handler.py") + + +SOURCE_DIR = _source_root() +MODULE_PATH = SOURCE_DIR / "gisaid_handler.py" +if str(SOURCE_DIR) not in sys.path: + sys.path.insert(0, str(SOURCE_DIR)) + +"""Unit tests initially generated with ChatGPT v5.5 "Deep Research" and "Thinking" +then modified for use and clarity with validation and coverage testing via mutmut.""" + +#******************************************************************************* +# create test gisaid.py connections +#******************************************************************************* + +@pytest.fixture() +def gisaid_handler_module(monkeypatch: pytest.MonkeyPatch): + monkeypatch.syspath_prepend(str(SOURCE_DIR)) + src_pkg: Any = types.ModuleType("src") + src_pkg.__path__ = [str(SOURCE_DIR)] + monkeypatch.setitem(sys.modules, "src", src_pkg) + + def alias_src_module(name, module): + monkeypatch.setitem(sys.modules, f"src.{name}", module) + monkeypatch.setitem(sys.modules, name, module) + setattr(src_pkg, name, module) + + upload_log_stub: Any = types.ModuleType("upload_log") + upload_log_stub.update_calls = [] + + def update_submission_status_csv(**kwargs): + upload_log_stub.update_calls.append(kwargs) + + upload_log_stub.update_submission_status_csv = update_submission_status_csv + + tools_stub: Any = types.ModuleType("tools") + tools_stub.check_credentials_calls = [] + + def check_credentials(**kwargs): + tools_stub.check_credentials_calls.append(kwargs) + + tools_stub.check_credentials = check_credentials + + file_handler_stub: Any = types.ModuleType("file_handler") + file_handler_stub.saved_csvs = [] + file_handler_stub.created_fastas = [] + file_handler_stub.validate_file_calls = [] + file_handler_stub.validate_gisaid_installer_calls = [] + + def save_csv(**kwargs): + file_handler_stub.saved_csvs.append(kwargs) + df = kwargs["df"] + path = Path(kwargs["file_path"]) / kwargs.get("file_name", "") + if kwargs.get("file_name"): + df.to_csv(path, index=False, sep=kwargs.get("sep", ",")) + + def create_fasta(**kwargs): + file_handler_stub.created_fastas.append(kwargs) + submission_dir = Path(kwargs["submission_dir"]) + submission_dir.mkdir(parents=True, exist_ok=True) + records = [] + metadata = kwargs["metadata"] + for _, row in metadata.iterrows(): + records.append(SeqRecord(Seq("ACGT"), id=row.get("gs-sample_name", "sample"), description="")) + with open(submission_dir / "sequence.fsa", "w") as handle: + SeqIO.write(records, handle, "fasta") + + def validate_file(file_type: str, file_path: str): + file_handler_stub.validate_file_calls.append({"file_type": file_type, "file_path": file_path}) + if not Path(file_path).is_file(): + raise SystemExit(1) + + def validate_gisaid_installer(submission_dir: str, organism: str, config_dict: dict): + file_handler_stub.validate_gisaid_installer_calls.append({"submission_dir": submission_dir, "organism": organism, "config_dict": config_dict}) + return str(Path(submission_dir) / f"{organism.lower()}CLI") + + file_handler_stub.save_csv = save_csv + file_handler_stub.create_fasta = create_fasta + file_handler_stub.validate_file = validate_file + file_handler_stub.validate_gisaid_installer = validate_gisaid_installer + + settings_stub: Any = types.ModuleType("settings") + settings_stub.GISAID_REGEX = "^gs-|^collection_date$|^authors$" + for module_name in [ + "gisaid_handler", + "src.gisaid_handler", + "upload_log", + "src.upload_log", + "tools", + "src.tools", + "file_handler", + "src.file_handler", + "settings", + "src.settings", + ]: + sys.modules.pop(module_name, None) + + monkeypatch.setitem(sys.modules, "src", src_pkg) + alias_src_module("upload_log", upload_log_stub) + alias_src_module("tools", tools_stub) + alias_src_module("file_handler", file_handler_stub) + alias_src_module("settings", settings_stub) + + sys.modules.pop("gisaid_handler", None) + sys.modules.pop("src.gisaid_handler", None) + spec = importlib.util.spec_from_file_location("gisaid_handler", MODULE_PATH) + assert spec and spec.loader + module: Any = importlib.util.module_from_spec(spec) + sys.modules["giasid_handler"] = module + setattr(src_pkg, "gisaid_handler", module) + spec.loader.exec_module(module) + return module + + +def assert_update_call(call: dict[str, Any], submission_dir: Path, expected_records: list[dict[str, str]]): + assert set(call) == {"submission_dir", "update_database", "update_df"} + assert call["submission_dir"] == str(submission_dir) + assert call["update_database"] == "GISAID" + assert call["update_df"] is not None + assert call["update_df"].to_dict("records") == expected_records + +def assert_no_none_strings(df: pd.DataFrame): + assert all(column is not None for column in df.columns) + for row in df.to_dict("records"): + for key, value in row.items(): + assert key is not None + assert value is not None +#******************************************************************************* +# process_flu_dates +#******************************************************************************* + +def test_process_flu_dates__full_year_month_and_full_date(gisaid_handler_module): + module = gisaid_handler_module + + year_only = module.process_flu_dates("2024").tolist() + year_month = module.process_flu_dates("2024-05").tolist() + full_date = module.process_flu_dates("2024-05-19").tolist() + + assert year_only == ["", "2024", ""] + assert year_month == ["", "2024", "05"] + assert full_date == ["2024-05-19", "", ""] + + assert all(value is not None for value in year_only) + assert all(value is not None for value in year_month) + assert all(value is not None for value in full_date) + +def test_process_flu_dates__invalid_date_parts_exit(gisaid_handler_module, capsys): + with pytest.raises(SystemExit) as exc: + gisaid_handler_module.process_flu_dates("2024-05-19-extra") + + assert exc.value.code == 1 + assert "Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: 2024-05-19-extra\n" == capsys.readouterr().err + +#******************************************************************************* +# create_gisaid_files +#******************************************************************************* + +def test_create_gisaid_files__cov_renames_required_fields_and_creates_files( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + copied = [] + + def fake_copy(src, dst): + copied.append((src, dst)) + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["hCoV-19/USA/1/2024"], + "gs-covv_sex": ["Female"], + "collection_date": ["2024-01-02"], + "authors": ["Smith, Jane"], + "organism": ["SARS-CoV-2"], + "fasta_sequence_orig": ["ACGTACGT"], + } + ) + + module.create_gisaid_files( + organism="COV", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + assert module.file_handler.saved_csvs[0]["file_name"] == "metadata.csv" + assert module.file_handler.saved_csvs[0]["file_path"] == str(tmp_path) + saved_df = module.file_handler.saved_csvs[0]["df"] + assert_no_none_strings(saved_df) + assert list(saved_df.columns[:3]) == ["submitter", "fn", "covv_virus_name"] + assert saved_df.loc[0, "submitter"] == "submitter1" + assert saved_df.loc[0, "fn"] == "sequence.fsa" + assert saved_df.loc[0, "covv_gender"] == "Female" + assert module.file_handler.created_fastas[0]["database"] == "GISAID" + assert module.file_handler.created_fastas[0]["submission_dir"] == str(tmp_path) + assert copied == [ + (str(tmp_path / "metadata.csv"), str(tmp_path / "orig_metadata.csv")), + (str(tmp_path / "sequence.fsa"), str(tmp_path / "orig_sequence.fsa")), + ] + assert saved_df.to_dict("records") == [ + { + "submitter": "submitter1", + "fn": "sequence.fsa", + "covv_virus_name": "hCoV-19/USA/1/2024", + "covv_gender": "Female", + "collection_date": "2024-01-02", + "authors": "Smith, Jane", + } + ] + +@pytest.mark.parametrize( + ("organism", "sample_column", "sex_in", "sex_out"), + [ + ("POX", "pox_virus_name", "pox_sex", "pox_gender"), + ("ARBO", "arbo_virus_name", "arbo_sex", "arbo_gender"), + ("RSV", "rsv_virus_name", "rsv_sex", "rsv_gender"), + ], +) +def test_create_gisaid_files__non_cov_flu_organisms( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + organism: str, + sample_column: str, + sex_in: str, + sex_out: str, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + module.file_handler.saved_csvs.clear() + + metadata = pd.DataFrame( + { + "gs-sample_name": [f"{organism}/sample/1"], + f"gs-{sex_in}": ["unknown"], + "collection_date": ["2024"], + "authors": ["Doe, John"], + } + ) + + module.create_gisaid_files( + organism=organism, + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert_no_none_strings(saved_df) + assert list(saved_df.columns[:3]) == ["submitter", "fn", sample_column] + assert saved_df.loc[0, "submitter"] == "submitter1" + assert saved_df.loc[0, "fn"] == "sequence.fsa" + assert saved_df.loc[0, sample_column] == f"{organism}/sample/1" + assert saved_df.loc[0, sex_out] == "unknown" + assert sample_column not in ["", None] + assert sex_out not in ["", None] + +def test_create_gisaid_files__flu_pivots_segments_and_splits_dates(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["segHA", "segNA"], + "gs-Isolate_Name": ["iso1", "iso1"], + "gs-segment": ["HA", "NA"], + "gs-Host_Sex": ["Female", "Female"], + "collection_date": ["2024-05", "2024-05"], + "authors": ["Smith, Jane", "Smith, Jane"], + } + ) + + module.create_gisaid_files( + organism="FLU", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert list(saved_df.columns[:3]) == ["Isolate_Id", "Segment_Ids", "Isolate_Name"] + assert saved_df.loc[0, "Isolate_Id"] == "" + assert saved_df.loc[0, "Segment_Ids"] == "" + assert saved_df.loc[0, "Isolate_Name"] == "iso1" + assert saved_df.loc[0, "Collection_Date"] == "" + assert saved_df.loc[0, "Collection_Year"] == "2024" + assert saved_df.loc[0, "Collection_Month"] == "05" + assert saved_df.loc[0, "Authors"] == "Smith, Jane" + assert saved_df.loc[0, "Host_Gender"] == "Female" + assert saved_df.loc[0, "Seq_Id (HA)"] == "segHA" + assert saved_df.loc[0, "Seq_Id (NA)"] == "segNA" + +def test_create_gisaid_files__flu_uses_exact_segment_merge_arguments(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + monkeypatch.setattr(module.shutil, "copy", lambda src, dst: None) + observed_merges: list[dict[str, Any]] = [] + original_merge = module.pd.DataFrame.merge + + def fake_merge(self, right, *args, **kwargs): + observed_merges.append({"left_columns": self.columns.tolist(), "right_columns": right.columns.tolist(), "args": args, "kwargs": kwargs}) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + metadata = pd.DataFrame( + { + "gs-sample_name": ["segHA", "segNA"], + "gs-Isolate_Name": ["iso1", "iso1"], + "gs-segment": ["HA", "NA"], + "gs-Host_Sex": ["Female", "Female"], + "collection_date": ["2024-05", "2024-05"], + "authors": ["Smith, Jane", "Smith, Jane"], + } + ) + + module.create_gisaid_files(organism="FLU", database="GISAID", submission_name="sub1", submission_dir=str(tmp_path), config_dict={"Username": "submitter1"}, metadata=metadata) + assert observed_merges == [ + { + "left_columns": ["Isolate_Name", "Host_Gender", "Authors", "Collection_Date", "Collection_Year", "Collection_Month", "Isolate_Id", "Segment_Ids"], + "right_columns": ["Isolate_Name", "Seq_Id (HA)", "Seq_Id (NA)"], + "args": (), + "kwargs": { + "on": "Isolate_Name", + "how": "inner", + "validate": "1:1", + }, + } + ] +#******************************************************************************* +# process_gisaid_log +#******************************************************************************* +def test_process_gisaid_log__validates_exact_file_type_and_opens_read_mode(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('"msg": "hCoV-19/USA/CA-10/2024; EPI_ISL_101010"\n') + + original_open = open + observed_open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + observed_open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert module.file_handler.validate_file_calls == [{"file_type": "GISAID log", "file_path": str(log_file)}] + assert observed_open_calls == [(str(log_file), "r")] +def test_process_gisaid_log__standard_epi_id_regex_branch_uses_exact_uppercase_pattern(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("epi_id: hCoV-19/USA/CA-21/2024; EPI12345\n") + + def fake_findall(pattern, line): + assert pattern == r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)' + return ["hCoV-19/USA/CA-21/2024", "EPI12345"] + + monkeypatch.setattr(module.re, "findall", fake_findall) + + with pytest.raises(KeyError, match="gisaid_accession_epi_isl_id"): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + captured = capsys.readouterr() + assert captured.out == "GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 1 + assert module.upload_log.update_calls[0]["update_database"] == "GISAID" + assert module.upload_log.update_calls[0]["submission_dir"] == str(tmp_path) + assert module.upload_log.update_calls[0]["update_df"].to_dict("records") == [ + { + "gs-segment_name": "hCoV-19/USA/CA-21/2024", + "gisaid_accession_epi_id": "EPI12345", + } + ] + +def test_process_gisaid_log__updates_for_isolate_and_existing_segment(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '\n'.join( + [ + '"msg": "hCoV-19/USA/CA-1/2024; EPI_ISL_12345"', + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-2/2024; [\'EPI_67890\']', + ] + ) + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates and GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 2 + assert module.upload_log.update_calls[0]["update_database"] == "GISAID" + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-1/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_12345", + } + ], + ) + + assert_update_call( + module.upload_log.update_calls[1], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-2/2024", + "gisaid_accession_epi_id": "EPI_67890", + } + ], + ) + +def test_process_gisaid_log__returns_only_failed_isolate_rows_and_filters_successes(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("placeholder\n") + original_dataframe = module.pd.DataFrame + + def fake_validate_file(file_type: str, file_path: str): + module.file_handler.validate_file_calls.append({"file_type": file_type, "file_path": file_path}) + + monkeypatch.setattr(module.file_handler, "validate_file", fake_validate_file) + + class FakeFile: + def __init__(self): + self.lines = iter(["placeholder\n", ""]) + + def readline(self): + return next(self.lines) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc, tb): + return False + + monkeypatch.setattr("builtins.open", lambda *args, **kwargs: FakeFile()) + + def fake_search(pattern, line): + return False + + monkeypatch.setattr(module.re, "search", fake_search) + call_count = {"value": 0} + + def fake_dataframe(rows=None, *args, **kwargs): + call_count["value"] += 1 + if call_count["value"] == 1: + return original_dataframe( + [ + { + "gs-sample_name": "success", + "gisaid_accession_epi_isl_id": "EPI_ISL_123", + }, + { + "gs-sample_name": "failed", + "gisaid_accession_epi_isl_id": "", + }, + { + "gs-sample_name": "missing", + "gisaid_accession_epi_isl_id": None, + }, + ] + ) + return original_dataframe(rows, *args, **kwargs) + + monkeypatch.setattr(module.pd, "DataFrame", fake_dataframe) + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + assert returned.to_dict("records") == [ + {"gs-sample_name": "failed"}, + {"gs-sample_name": "missing"}, + ] + +def test_process_gisaid_log__returns_failed_isolate_rows_without_accessions(tmp_path: Path, gisaid_handler_module): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-3/2024; []\n' + ) + + # This line matches the duplicate-sample branch but has no accession. The code records + # no isolate and currently falls through to the empty-dataframe bug covered below. + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + +def test_process_gisaid_log__no_accessions_currently_raises_keyerror(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("no accession on this line\n") + + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert capsys.readouterr().out == ( + "Finished reading GISAID log. If workflow has failed here, " + "it's likely no GISAID IDs were returned. Check results in GISAID upload log.\n" + "Warning: no GISAID isolates or segments found\n" + ) + +#******************************************************************************* +# submit_gisaid +#******************************************************************************* + +def test_submit_gisaid__success_when_status_report_has_all_accessions(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + (submission_dir / "metadata.csv").write_text("placeholder\n") + (submission_dir / "sequence.fsa").write_text(">s1\nACGT\n") + pd.DataFrame({"covv_virus_name": ["hCoV-19/USA/CA-1/2024"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + (submission_dir / "orig_sequence.fsa").write_text(">hCoV-19/USA/CA-1/2024\nACGT\n") + pd.DataFrame( + { + "gs-sample_name": ["hCoV-19/USA/CA-1/2024"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_12345"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + assert command == [ + str(submission_dir / "covCLI"), + "upload", + "--username", + "u", + "--password", + "p", + "--clientid", + "cid", + "--metadata", + str(submission_dir / "metadata.csv"), + "--fasta", + str(submission_dir / "sequence.fsa"), + "--log", + str(submission_dir / "gisaid_upload_log_1.txt"), + "--debug", + ] + assert cwd == str(submission_dir) + assert stdout == module.subprocess.PIPE + assert stderr == module.subprocess.PIPE + + log_path = Path(command[command.index("--log") + 1]) + log_path.write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert sleep_calls == [5] + assert capsys.readouterr().out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "Uploading successfully\n" + f"Log file is stored at: {submission_dir}/gisaid_upload_log_attempt_1.txt\n" + ) + assert module.tools.check_credentials_calls == [ + {"config_dict": {"Username": "u", "Password": "p", "Client-Id": "cid"}, "database": "GISAID"} + ] + +def test_submit_gisaid__subprocess_failure_exits(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + (submission_dir / "metadata.csv").write_text("placeholder\n") + (submission_dir / "orig_metadata.csv").write_text("covv_virus_name\ns1\n") + (submission_dir / "sequence.fsa").write_text(">s1\nACGT\n") + (submission_dir / "orig_sequence.fsa").write_text(">s1\nACGT\n") + (tmp_path / "submission_status_report.csv").write_text("gs-sample_name,gisaid_accession_epi_isl_id\ns1,\n") + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_run(*args, **kwargs): + return types.SimpleNamespace(returncode=1, stdout=b"bad out", stderr=b"bad err") + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(SystemExit) as exc: + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + assert sleep_calls == [5] + captured = capsys.readouterr() + assert exc.value.code == 1 + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "b'bad out'\n" + "b'bad err'\n" + ) + assert captured.err == "Error: upload command error\n" + +#******************************************************************************* +# update_gisaid_files +#******************************************************************************* + +@pytest.mark.parametrize( + ("organism", "metadata_column", "fasta_name", "status_rows"), + [ + ("COV", "covv_virus_name", "sample1", {"gs-sample_name": ["sample1"]}), + ("POX", "pox_virus_name", "sample1", {"gs-sample_name": ["sample1"]}), + ( + "FLU", + "Isolate_Name", + "segHA", + {"gs-sample_name": ["iso1"], "gs-segment_name": ["segHA"]}, + ), + ], +) +def test_update_gisaid_files__filters_to_processed_genbank_rows_and_rewrites_files( + tmp_path: Path, + gisaid_handler_module, + organism: str, + metadata_column: str, + fasta_name: str, + status_rows: dict, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + original_metadata_value = "iso1" if organism == "FLU" else "sample1" + pd.DataFrame({metadata_column: [original_metadata_value, "dropme"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id=fasta_name, description=""), + SeqRecord(Seq("CCCC"), id="dropme", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + **{key: values + ["dropme"] for key, values in status_rows.items()}, + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism=organism, + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + assert (submission_dir / "metadata.csv").exists() + assert (submission_dir / "orig_metadata.csv").exists() + assert (submission_dir / "sequence.fsa").exists() + assert (submission_dir / "orig_sequence.fsa").exists() + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata[metadata_column].tolist() == [original_metadata_value] + rewritten_records = list(SeqIO.parse(submission_dir / "sequence.fsa", "fasta")) + assert [record.id for record in rewritten_records] == [fasta_name] + +def test_update_gisaid_files__genbank_status_filter_uses_na_false(tmp_path: Path, gisaid_handler_module): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", + index=False, + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + + pd.DataFrame( + { + "genbank-status": ["processed-ok", None], + "gs-sample_name": ["sample1", "sample2"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism="COV", + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata["covv_virus_name"].tolist() == ["sample1"] + + rewritten_fasta_ids = [ + record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta") + ] + assert rewritten_fasta_ids == ["sample1"] + +def test_update_gisaid_files__uses_exact_read_merge_drop_to_csv_and_open_args(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + metadata_path = submission_dir / "metadata.csv" + orig_metadata_path = submission_dir / "orig_metadata.csv" + fasta_path = submission_dir / "sequence.fsa" + orig_fasta_path = submission_dir / "orig_sequence.fsa" + status_path = tmp_path / "submission_status_report.csv" + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(metadata_path, index=False) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + orig_fasta_path, + "fasta", + ) + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + "gs-sample_name": ["sample1", "sample2"], + } + ).to_csv(status_path, index=False) + + original_read_csv = module.pd.read_csv + read_csv_calls: list[dict[str, Any]] = [] + + def fake_read_csv(*args, **kwargs): + read_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_read_csv(*args, **kwargs) + + monkeypatch.setattr(module.pd, "read_csv", fake_read_csv) + original_merge = module.pd.DataFrame.merge + merge_calls: list[dict[str, Any]] = [] + + def fake_merge(self, right, *args, **kwargs): + merge_calls.append( + { + "left_columns": self.columns.tolist(), + "right_columns": right.columns.tolist(), + "args": args, + "kwargs": kwargs, + } + ) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + original_drop = module.pd.DataFrame.drop + drop_calls: list[dict[str, Any]] = [] + + def fake_drop(self, *args, **kwargs): + drop_calls.append({"args": args, "kwargs": kwargs}) + return original_drop(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "drop", fake_drop) + original_to_csv = module.pd.DataFrame.to_csv + to_csv_calls: list[dict[str, Any]] = [] + + def fake_to_csv(self, *args, **kwargs): + to_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_to_csv(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "to_csv", fake_to_csv) + original_open = open + open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + if str(file).endswith(("orig_sequence.fsa", "sequence.fsa")): + open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + module.update_gisaid_files(organism="COV", submission_dir=str(submission_dir), submission_status_file=str(status_path)) + assert read_csv_calls == [ + { + "args": (str(status_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + { + "args": (str(metadata_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + ] + + assert merge_calls[0]["kwargs"] == { + "how": "inner", + "left_on": "covv_virus_name", + "right_on": "gs-sample_name", + } + + assert drop_calls[0]["kwargs"] == { + "columns": ["gs-sample_name", "gs-segment_name"], + "errors": "ignore", + } + + assert to_csv_calls[-1] == { + "args": (str(orig_metadata_path),), + "kwargs": { + "header": True, + "index": False, + }, + } + + assert open_calls == [ + (str(orig_fasta_path), "r"), + (str(fasta_path), "w+"), + ] + +def test_update_gisaid_files__no_processed_rows_writes_empty_files( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write([SeqRecord(Seq("AAAA"), id="sample1", description="")], submission_dir / "orig_sequence.fsa", "fasta") + pd.DataFrame( + { + "genbank-status": ["failed"], + "gs-sample_name": ["sample1"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism="COV", + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + assert pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str).empty + assert list(SeqIO.parse(submission_dir / "sequence.fsa", "fasta")) == [] + +def test_process_flu_dates__trims_whitespace(gisaid_handler_module): + assert gisaid_handler_module.process_flu_dates(" 2024-07-03 ").tolist() == ["2024-07-03", "", ""] + + +def test_create_gisaid_files__unsupported_other_organism_currently_raises_unboundlocalerror( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["OTHER/sample/1"], + "collection_date": ["2024"], + "authors": ["Doe, John"], + } + ) + + # Current behavior: create_gisaid_files has branches for COV/POX/ARBO/RSV and FLU, + # but not OTHER, leaving first_cols undefined. + with pytest.raises(UnboundLocalError): + module.create_gisaid_files( + organism="OTHER", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + +def test_create_gisaid_files__flu_full_date_populates_collection_date_column( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + monkeypatch.setattr(module.shutil, "copy", fake_copy) + module.file_handler.saved_csvs.clear() + + metadata = pd.DataFrame( + { + "gs-sample_name": ["segPB2"], + "gs-Isolate_Name": ["iso-full-date"], + "gs-segment": ["PB2"], + "gs-Host_Sex": ["Male"], + "collection_date": ["2024-07-03"], + "authors": ["Smith, Jane"], + } + ) + + module.create_gisaid_files( + organism="FLU", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert saved_df.loc[0, "Collection_Date"] == "2024-07-03" + assert saved_df.loc[0, "Collection_Year"] == "" + assert saved_df.loc[0, "Collection_Month"] == "" + assert saved_df.loc[0, "Seq_Id (PB2)"] == "segPB2" + + +def test_process_gisaid_log__missing_log_file_exits(tmp_path: Path, gisaid_handler_module): + with pytest.raises(SystemExit): + gisaid_handler_module.process_gisaid_log( + log_file=str(tmp_path / "missing.log"), + submission_dir=str(tmp_path), + ) +def test_submit_gisaid__post_loop_empty_metadata_returns_exact_processed(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv( + submission_dir / "orig_metadata.csv", + index=False, + ) + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv( + submission_dir / "metadata.csv", + index=False, + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description="")], + submission_dir / "sequence.fsa", + "fasta", + ) + + pd.DataFrame( + { + "gs-sample_name": ["sample1"], + "gisaid_accession_epi_isl_id": [""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + monkeypatch.setattr(module.time, "sleep", lambda seconds: None) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + + # On attempt 4, mutate the status file so the loop's final metadata_df becomes empty. + if command[command.index("--log") + 1].endswith("gisaid_upload_log_4.txt"): + pd.DataFrame( + { + "gs-sample_name": ["sample1"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_FINAL"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + +def test_process_gisaid_log__existing_duplicate_isolate_accession_updates_status(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '"code": "validation_error" sample already exists; ' + "existing_virus_name: hCoV-19/USA/CA-3/2024; ['EPI_ISL_99999']\n" + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-3/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_99999", + } + ], +) + +def test_process_gisaid_log__standard_epi_id_message_currently_not_returned_as_segment( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('epi_id: hCoV-19/USA/CA-4/2024; EPI_ID_123456\n') + + # Current behavior: the line matches the broad regex, but the extracted accession + # EPI_ID_123456 does not satisfy re.match(r"EPI\d+", ...), so no segment row is + # recorded and the empty-dataframe bug is reached. + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + +def test_submit_gisaid__partial_failure_rewrites_remaining_samples_then_retries_successfully( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description=""), SeqRecord(Seq("CCCC"), id="sample2", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + (submission_dir / "sequence.fsa").write_text(">sample1\nAAAA\n>sample2\nCCCC\n") + status_file = tmp_path / "submission_status_report.csv" + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(status_file, index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + process_calls = {"count": 0} + + def fake_process_gisaid_log(**kwargs): + process_calls["count"] += 1 + if process_calls["count"] == 2: + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", "EPI_ISL_222"], + } + ).to_csv(status_file, index=False) + return pd.DataFrame() + + def fake_run(command, cwd, stdout, stderr): + log_path = Path(command[command.index("--log") + 1]) + log_path.write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert process_calls["count"] == 2 + # The first retry should rewrite the active files to only the unsubmitted sample. + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + active_fasta_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_fasta_ids == ["sample2"] + + +def test_submit_gisaid__returns_error_after_all_retry_attempts_have_remaining_samples(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write([SeqRecord(Seq("AAAA"), id="sample1", description="")], submission_dir / "orig_sequence.fsa", "fasta") + (submission_dir / "sequence.fsa").write_text(">sample1\nAAAA\n") + pd.DataFrame( + {"gs-sample_name": ["sample1"], "gisaid_accession_epi_isl_id": [""]} + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + run_calls = [] + + def fake_run(command, cwd, stdout, stderr): + run_calls.append(command) + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + captured = capsys.readouterr() + + assert status == "ERROR" + assert sleep_calls == [5] + assert len(run_calls) == 4 + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. " + "If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "\n" + "Submission attempt: 2\n" + "\n" + "Submission attempt: 3\n" + "\n" + "Submission attempt: 4\n" + ) + assert captured.err == ( + "Error: 1 sample(s) failed to upload to GISAID\n" + f"Please check log file at: {submission_dir}/gisaid_upload_log_attempt_{{1,2,3}}.txt\n" + ) + + +def test_submit_gisaid__other_organism_uses_lowercase_virus_name_for_remaining_metadata( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"rsv_virus_name": ["rsv1", "rsv2"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"rsv_virus_name": ["rsv1", "rsv2"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="rsv1", description=""), SeqRecord(Seq("CCCC"), id="rsv2", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + (submission_dir / "sequence.fsa").write_text(">rsv1\nAAAA\n>rsv2\nCCCC\n") + status_file = tmp_path / "submission_status_report.csv" + pd.DataFrame( + {"gs-sample_name": ["rsv1", "rsv2"], "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""]} + ).to_csv(status_file, index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="RSV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "ERROR" + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + assert active_metadata["rsv_virus_name"].tolist() == ["rsv2"] + + +def test_update_gisaid_files__arbo_and_rsv_use_lowercase_virus_name_columns( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + + for organism in ["ARBO", "RSV"]: + submission_dir = tmp_path / organism / "GISAID" + submission_dir.mkdir(parents=True) + metadata_column = organism.lower() + "_virus_name" + pd.DataFrame({metadata_column: [f"{organism.lower()}1", "dropme"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id=f"{organism.lower()}1", description=""), + SeqRecord(Seq("CCCC"), id="dropme", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + status_file = submission_dir.parent / "submission_status_report.csv" + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + "gs-sample_name": [f"{organism.lower()}1", "dropme"], + } + ).to_csv(status_file, index=False) + + module.update_gisaid_files( + organism=organism, + submission_dir=str(submission_dir), + submission_status_file=str(status_file), + ) + + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata[metadata_column].tolist() == [f"{organism.lower()}1"] + assert [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] == [ + f"{organism.lower()}1" + ] + + +def test_submit_gisaid__rewrite_block_updates_active_metadata_and_fasta_before_next_attempt( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + """Regression coverage for the retry block that rewrites metadata.csv and sequence.fsa.""" + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + # sample1 has an accession after the first attempt; sample2 should remain active. + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + assert active_ids == ["sample2"] + raise RuntimeError("stop after proving retry inputs were rewritten") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(RuntimeError, match="retry inputs were rewritten"): + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + +def test_submit_gisaid__uses_exact_read_csv_settings_for_status_and_orig_metadata(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + metadata_path = submission_dir / "metadata.csv" + orig_metadata_path = submission_dir / "orig_metadata.csv" + fasta_path = submission_dir / "sequence.fsa" + orig_fasta_path = submission_dir / "orig_sequence.fsa" + status_path = tmp_path / "submission_status_report.csv" + + metadata_path.write_text("covv_virus_name\nsample1\n") + orig_metadata_path.write_text("covv_virus_name\nsample1\n") + fasta_path.write_text(">sample1\nAAAA\n") + orig_fasta_path.write_text(">sample1\nAAAA\n") + status_path.write_text("gs-sample_name,gisaid_accession_epi_isl_id\nsample1,EPI_ISL_1\n") + + sleep_calls: list[int] = [] + monkeypatch.setattr(module.time, "sleep", lambda seconds: sleep_calls.append(seconds)) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + original_read_csv = module.pd.read_csv + observed_read_csv: list[dict[str, Any]] = [] + + def fake_read_csv(*args, **kwargs): + observed_read_csv.append({"args": args, "kwargs": kwargs}) + return original_read_csv(*args, **kwargs) + + monkeypatch.setattr(module.pd, "read_csv", fake_read_csv) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert observed_read_csv == [ + { + "args": (str(status_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + { + "args": (str(orig_metadata_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + ] + +def test_submit_gisaid__retry_rewrite_uses_exact_merge_drop_to_csv_and_open_args(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + status_path = tmp_path / "submission_status_report.csv" + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(status_path, index=False) + + sleep_calls: list[int] = [] + monkeypatch.setattr(module.time, "sleep", lambda seconds: sleep_calls.append(seconds)) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + raise RuntimeError("stop after first rewrite") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + original_merge = module.pd.DataFrame.merge + merge_calls: list[dict[str, Any]] = [] + + def fake_merge(self, right, *args, **kwargs): + merge_calls.append( + { + "left_columns": self.columns.tolist(), + "right_columns": right.columns.tolist(), + "args": args, + "kwargs": kwargs, + } + ) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + original_drop = module.pd.DataFrame.drop + drop_calls: list[dict[str, Any]] = [] + + def fake_drop(self, *args, **kwargs): + drop_calls.append({"args": args, "kwargs": kwargs}) + return original_drop(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "drop", fake_drop) + original_to_csv = module.pd.DataFrame.to_csv + to_csv_calls: list[dict[str, Any]] = [] + + def fake_to_csv(self, *args, **kwargs): + to_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_to_csv(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "to_csv", fake_to_csv) + original_open = open + open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + if str(file).endswith(("orig_sequence.fsa", "sequence.fsa")): + open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + with pytest.raises(RuntimeError, match="first rewrite"): + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert merge_calls[0]["kwargs"] == { + "how": "inner", + "left_on": "covv_virus_name", + "right_on": "gs-sample_name", + } + + assert drop_calls[0]["kwargs"] == { + "columns": ["gs-sample_name", "gs-segment_name"], + "errors": "ignore", + } + + assert to_csv_calls[-1] == { + "args": (os.path.join(str(submission_dir), "metadata.csv"),), + "kwargs": { + "header": True, + "index": False, + }, + } + + assert open_calls == [ + (str(submission_dir / "orig_sequence.fsa"), "r"), + (str(submission_dir / "sequence.fsa"), "w+"), + ] + +def test_submit_gisaid__after_retry_loop_returns_error_and_leaves_remaining_active_files( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + capsys, +): + """Covers the post-loop `if not metadata_df.empty: return "ERROR"` branch.""" + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + # sample1 is complete, sample2 remains incomplete for every attempt. + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + captured = capsys.readouterr() + + assert status == "ERROR" + assert sleep_calls == [5] + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. " + "If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "\n" + "Submission attempt: 2\n" + "\n" + "Submission attempt: 3\n" + "\n" + "Submission attempt: 4\n" + ) + assert captured.err == ( + "Error: 1 sample(s) failed to upload to GISAID\n" + f"Please check log file at: {submission_dir}/gisaid_upload_log_attempt_{{1,2,3}}.txt\n" + ) + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + assert active_ids == ["sample2"] + + +def test_process_gisaid_log__standard_message_isolate_branch_updates_status(tmp_path: Path, gisaid_handler_module, capsys): + """Covers the normal first regex branch for EPI_ISL_* accessions.""" + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('"msg": "hCoV-19/USA/CA-10/2024; EPI_ISL_101010"\n') + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-10/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_101010", + } + ], + ) + + +def test_process_gisaid_log__standard_message_segment_branch_updates_status_with_epi_digits(tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + capsys, +): + """Covers the `elif re.match(r"EPI\\d+", accession_string)` branch. + + The source regex accepts `EPI12345` in the broad line matcher, but the later + `findall` pattern only extracts `EPI_*` tokens. This test patches only the + extraction call so the intended branch is covered and documented. + """ + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('epi_id: hCoV-19/USA/CA-11/2024; EPI12345\n') + + def fake_findall(pattern, line): + return ["hCoV-19/USA/CA-11/2024", "EPI12345"] + + monkeypatch.setattr(module.re, "findall", fake_findall) + + with pytest.raises(KeyError, match="gisaid_accession_epi_isl_id"): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert capsys.readouterr().out == "GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-11/2024", + "gisaid_accession_epi_id": "EPI12345", + } + ], + ) + + +def test_process_gisaid_log__existing_validation_error_isolate_and_segment_branches(tmp_path: Path, gisaid_handler_module, capsys): + """Covers both already-exists branches: EPI_ISL_* and EPI_* accessions.""" + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + "\n".join( + [ + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-12/2024; [\'EPI_ISL_121212\']', + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-13/2024; [\'EPI_131313\']', + ] + ) + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates and GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 2 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-12/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_121212", + } + ], + ) + + assert_update_call( + module.upload_log.update_calls[1], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-13/2024", + "gisaid_accession_epi_id": "EPI_131313", + } + ], + ) + + +@pytest.mark.parametrize( + ( + "organism", + "metadata_column", + "fasta_column", + "metadata_values", + "fasta_ids", + "status_frame", + "expected_remaining_metadata", + "expected_remaining_fasta", + ), + [ + ( + "FLU", + "Isolate_Name", + "gs-segment_name", + ["iso1", "iso2"], + ["seg1", "seg2"], + pd.DataFrame( + { + "gs-sample_name": ["iso1", "iso2"], + "gs-segment_name": ["seg1", "seg2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + "gisaid_accession_epi_id": ["EPI123", ""], + } + ), + ["iso2"], + ["seg2"], + ), + ( + "COV", + "covv_virus_name", + "gs-sample_name", + ["cov1", "cov2"], + ["cov1", "cov2"], + pd.DataFrame( + { + "gs-sample_name": ["cov1", "cov2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + } + ), + ["cov2"], + ["cov2"], + ), + ( + "ARBO", + "arbo_virus_name", + "gs-sample_name", + ["arbo1", "arbo2"], + ["arbo1", "arbo2"], + pd.DataFrame( + { + "gs-sample_name": ["arbo1", "arbo2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + } + ), + ["arbo2"], + ["arbo2"], + ), + ], +) +def test_submit_gisaid__status_filter_branches_rewrite_remaining_metadata_and_fasta( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + organism: str, + metadata_column: str, + fasta_column: str, + metadata_values: list[str], + fasta_ids: list[str], + status_frame: pd.DataFrame, + expected_remaining_metadata: list[str], + expected_remaining_fasta: list[str], +): + """Covers the FLU, COV, and non-COV/non-FLU filtering branches in submit_gisaid().""" + module = gisaid_handler_module + submission_dir = tmp_path / organism / "GISAID" + submission_dir.mkdir(parents=True) + + pd.DataFrame({metadata_column: metadata_values}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({metadata_column: metadata_values}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id=fasta_ids[0], description=""), SeqRecord(Seq("CCCC"), id=fasta_ids[1], description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id=fasta_ids[0], description=""), SeqRecord(Seq("CCCC"), id=fasta_ids[1], description="")], + submission_dir / "sequence.fsa", + "fasta", + ) + status_frame.to_csv(submission_dir.parent / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata[metadata_column].tolist() == expected_remaining_metadata + assert active_ids == expected_remaining_fasta + raise RuntimeError(f"{organism} retry inputs were rewritten") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(RuntimeError, match=f"{organism} retry inputs were rewritten"): + module.submit_gisaid( + organism=organism, + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) diff --git a/src/tools.py b/src/tools.py index 95fac25..316e94f 100755 --- a/src/tools.py +++ b/src/tools.py @@ -41,6 +41,16 @@ def decrypt_passwords(config_dict: dict[str, Any], submission_portals: set[str], if not encrypted_string.endswith("="): print("Passwords field does not appear to be encrypted. Use SeqSender command 'load_credentials' to encrypt your credentials before submission.", file=sys.stderr) raise(InvalidToken) +<<<<<<< HEAD + if parent_db == "GISAID": + encrypted_string = config_dict["Submission"]["GISAID"]["Client-Id"] + try: + decrypted_string = Fernet(key).decrypt(encrypted_string) + config_dict["Submission"]["GISAID"]["Client-Id"] = decrypted_string + except InvalidToken: + raise(InvalidToken) +======= +>>>>>>> gisaid_removed return config_dict def encrypt_passwords(config_file: str, databases: list[str], encryption_key: Optional[str]) -> None: @@ -57,6 +67,13 @@ def encrypt_passwords(config_file: str, databases: list[str], encryption_key: Op password = getpass(f"Enter password for {parent_db} account: ") if parent_db == "NCBI": ncbi_handler.ncbi_login(config_dict["NCBI"], crash_on_error = True) +<<<<<<< HEAD + elif parent_db == "GISAID": + client_id = getpass(f"Enter client_id for GISAID account: ") + encrypted_client_id = encrypter.encrypt(client_id.encode()) + config_dict["GISAID"]["Client-Id"] = encrypted_client_id +======= +>>>>>>> gisaid_removed encrypted_password = encrypter.encrypt(password.encode()) config_dict[parent_db]["Password"] = encrypted_password file_handler.save_yaml(config_dict = config_dict, yaml_path = config_file) @@ -100,17 +117,55 @@ def get_submission_schema_config_name(submission_portals: set[str]) -> str: submission_schema_file_name += "schema.py" return submission_schema_file_name +<<<<<<< HEAD +def validate_submission_position(config_dict: dict[str, Any]): + genbank_position = get_submission_position(config_dict=config_dict, database="GENBANK") + gisaid_position = get_submission_position(config_dict=config_dict, database="GISAID") + if (gisaid_position is None and genbank_position is not None) or (gisaid_position is not None and genbank_position is None) or (isinstance(gisaid_position, int) and isinstance(genbank_position, int) and gisaid_position == genbank_position): + print(f"Error: Config file is incorrect. Submission position for GISAID '{gisaid_position}' and GenBank '{genbank_position}' must both be either left empty, or set to '1' and '2' based on submission preference.", file=sys.stderr) + sys.exit(1) + +======= +>>>>>>> gisaid_removed def get_submission_type(test: bool) -> str: if test: return "TEST" else: return "PRODUCTION" +<<<<<<< HEAD +def get_submission_position(config_dict: dict[str, Any], database: str) -> Optional[int]: + if database in ["BIOSAMPLE", "SRA", "GENBANK"]: + parent_database = "NCBI" + elif database == "GISAID": + parent_database = "GISAID" + else: + print(f"Error: database {database} is not a valid selection.", file=sys.stderr) + sys.exit(1) + if "Submission" in config_dict: + config_dict = config_dict["Submission"] + if parent_database in config_dict: + config_dict = config_dict[parent_database] + if "Submission_Position" in config_dict and isinstance(config_dict["Submission_Position"], int): + return config_dict["Submission_Position"] + else: + return None + +def password_encryption_config_schema_updates(schema: dict[str, Any], submission_portals: set[str]) -> dict[str, Any]: + if "NCBI" in submission_portals: + schema["Submission"]["schema"]["NCBI"]["schema"]["Password"]["required"] = False + if "GISAID" in submission_portals: + schema["Submission"]["schema"]["GISAID"]["schema"]["Password"]["required"] = False + schema["Submission"]["schema"]["GISAID"]["schema"]["Client-Id"]["required"] = False + return schema + +======= def password_encryption_config_schema_updates(schema: dict[str, Any], submission_portals: set[str]) -> dict[str, Any]: if "NCBI" in submission_portals: schema["Submission"]["schema"]["NCBI"]["schema"]["Password"]["required"] = False return schema +>>>>>>> gisaid_removed def database_specific_config_schema_updates(schema: dict[str, Any], database: list[str]) -> dict[str, Any]: # Update seqsender base schema to include needed checks if "BIOSAMPLE" in database: diff --git a/tests/unit/test_gisaid_handler.py b/tests/unit/test_gisaid_handler.py new file mode 100644 index 0000000..0b7c322 --- /dev/null +++ b/tests/unit/test_gisaid_handler.py @@ -0,0 +1,1891 @@ +from __future__ import annotations + +import importlib.util +import sys +import types +from pathlib import Path +import os +import pandas as pd +import pytest +from Bio import SeqIO +from Bio.Seq import Seq +from Bio.SeqRecord import SeqRecord +from typing import Any + +def _source_root() -> Path: + here = Path(__file__).resolve() + for parent in here.parents: + # During mutmut, prefer the mutated source tree. + mutant_src = parent / "src" + if parent.name == "mutants" and (mutant_src / "gisaid_handler.py").exists(): + return mutant_src + + # Normal pytest run. + normal_src = parent / "src" + if (normal_src / "gisaid_handler.py").exists() and parent.name != "mutants": + return normal_src + + raise RuntimeError("Could not find src/gisaid_handler.py") + + +SOURCE_DIR = _source_root() +MODULE_PATH = SOURCE_DIR / "gisaid_handler.py" +if str(SOURCE_DIR) not in sys.path: + sys.path.insert(0, str(SOURCE_DIR)) + +"""Unit tests initially generated with ChatGPT v5.5 "Deep Research" and "Thinking" +then modified for use and clarity with validation and coverage testing via mutmut.""" + +#******************************************************************************* +# create test gisaid.py connections +#******************************************************************************* + +@pytest.fixture() +def gisaid_handler_module(monkeypatch: pytest.MonkeyPatch): + monkeypatch.syspath_prepend(str(SOURCE_DIR)) + src_pkg: Any = types.ModuleType("src") + src_pkg.__path__ = [str(SOURCE_DIR)] + monkeypatch.setitem(sys.modules, "src", src_pkg) + + def alias_src_module(name, module): + monkeypatch.setitem(sys.modules, f"src.{name}", module) + monkeypatch.setitem(sys.modules, name, module) + setattr(src_pkg, name, module) + + upload_log_stub: Any = types.ModuleType("upload_log") + upload_log_stub.update_calls = [] + + def update_submission_status_csv(**kwargs): + upload_log_stub.update_calls.append(kwargs) + + upload_log_stub.update_submission_status_csv = update_submission_status_csv + + tools_stub: Any = types.ModuleType("tools") + tools_stub.check_credentials_calls = [] + + def check_credentials(**kwargs): + tools_stub.check_credentials_calls.append(kwargs) + + tools_stub.check_credentials = check_credentials + + file_handler_stub: Any = types.ModuleType("file_handler") + file_handler_stub.saved_csvs = [] + file_handler_stub.created_fastas = [] + file_handler_stub.validate_file_calls = [] + file_handler_stub.validate_gisaid_installer_calls = [] + + def save_csv(**kwargs): + file_handler_stub.saved_csvs.append(kwargs) + df = kwargs["df"] + path = Path(kwargs["file_path"]) / kwargs.get("file_name", "") + if kwargs.get("file_name"): + df.to_csv(path, index=False, sep=kwargs.get("sep", ",")) + + def create_fasta(**kwargs): + file_handler_stub.created_fastas.append(kwargs) + submission_dir = Path(kwargs["submission_dir"]) + submission_dir.mkdir(parents=True, exist_ok=True) + records = [] + metadata = kwargs["metadata"] + for _, row in metadata.iterrows(): + records.append(SeqRecord(Seq("ACGT"), id=row.get("gs-sample_name", "sample"), description="")) + with open(submission_dir / "sequence.fsa", "w") as handle: + SeqIO.write(records, handle, "fasta") + + def validate_file(file_type: str, file_path: str): + file_handler_stub.validate_file_calls.append({"file_type": file_type, "file_path": file_path}) + if not Path(file_path).is_file(): + raise SystemExit(1) + + def validate_gisaid_installer(submission_dir: str, organism: str, config_dict: dict): + file_handler_stub.validate_gisaid_installer_calls.append({"submission_dir": submission_dir, "organism": organism, "config_dict": config_dict}) + return str(Path(submission_dir) / f"{organism.lower()}CLI") + + file_handler_stub.save_csv = save_csv + file_handler_stub.create_fasta = create_fasta + file_handler_stub.validate_file = validate_file + file_handler_stub.validate_gisaid_installer = validate_gisaid_installer + + settings_stub: Any = types.ModuleType("settings") + settings_stub.GISAID_REGEX = "^gs-|^collection_date$|^authors$" + for module_name in [ + "gisaid_handler", + "src.gisaid_handler", + "upload_log", + "src.upload_log", + "tools", + "src.tools", + "file_handler", + "src.file_handler", + "settings", + "src.settings", + ]: + sys.modules.pop(module_name, None) + + monkeypatch.setitem(sys.modules, "src", src_pkg) + alias_src_module("upload_log", upload_log_stub) + alias_src_module("tools", tools_stub) + alias_src_module("file_handler", file_handler_stub) + alias_src_module("settings", settings_stub) + + sys.modules.pop("gisaid_handler", None) + sys.modules.pop("src.gisaid_handler", None) + spec = importlib.util.spec_from_file_location("gisaid_handler", MODULE_PATH) + assert spec and spec.loader + module: Any = importlib.util.module_from_spec(spec) + sys.modules["giasid_handler"] = module + setattr(src_pkg, "gisaid_handler", module) + spec.loader.exec_module(module) + return module + + +def assert_update_call(call: dict[str, Any], submission_dir: Path, expected_records: list[dict[str, str]]): + assert set(call) == {"submission_dir", "update_database", "update_df"} + assert call["submission_dir"] == str(submission_dir) + assert call["update_database"] == "GISAID" + assert call["update_df"] is not None + assert call["update_df"].to_dict("records") == expected_records + +def assert_no_none_strings(df: pd.DataFrame): + assert all(column is not None for column in df.columns) + for row in df.to_dict("records"): + for key, value in row.items(): + assert key is not None + assert value is not None +#******************************************************************************* +# process_flu_dates +#******************************************************************************* + +def test_process_flu_dates__full_year_month_and_full_date(gisaid_handler_module): + module = gisaid_handler_module + + year_only = module.process_flu_dates("2024").tolist() + year_month = module.process_flu_dates("2024-05").tolist() + full_date = module.process_flu_dates("2024-05-19").tolist() + + assert year_only == ["", "2024", ""] + assert year_month == ["", "2024", "05"] + assert full_date == ["2024-05-19", "", ""] + + assert all(value is not None for value in year_only) + assert all(value is not None for value in year_month) + assert all(value is not None for value in full_date) + +def test_process_flu_dates__invalid_date_parts_exit(gisaid_handler_module, capsys): + with pytest.raises(SystemExit) as exc: + gisaid_handler_module.process_flu_dates("2024-05-19-extra") + + assert exc.value.code == 1 + assert "Error: Unable to process 'Collection_Date' column for FLU GISAID submission. The field should be in format 'YYYY-MM-DD'. Value unable to process: 2024-05-19-extra\n" == capsys.readouterr().err + +#******************************************************************************* +# create_gisaid_files +#******************************************************************************* + +def test_create_gisaid_files__cov_renames_required_fields_and_creates_files( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + copied = [] + + def fake_copy(src, dst): + copied.append((src, dst)) + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["hCoV-19/USA/1/2024"], + "gs-covv_sex": ["Female"], + "collection_date": ["2024-01-02"], + "authors": ["Smith, Jane"], + "organism": ["SARS-CoV-2"], + "fasta_sequence_orig": ["ACGTACGT"], + } + ) + + module.create_gisaid_files( + organism="COV", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + assert module.file_handler.saved_csvs[0]["file_name"] == "metadata.csv" + assert module.file_handler.saved_csvs[0]["file_path"] == str(tmp_path) + saved_df = module.file_handler.saved_csvs[0]["df"] + assert_no_none_strings(saved_df) + assert list(saved_df.columns[:3]) == ["submitter", "fn", "covv_virus_name"] + assert saved_df.loc[0, "submitter"] == "submitter1" + assert saved_df.loc[0, "fn"] == "sequence.fsa" + assert saved_df.loc[0, "covv_gender"] == "Female" + assert module.file_handler.created_fastas[0]["database"] == "GISAID" + assert module.file_handler.created_fastas[0]["submission_dir"] == str(tmp_path) + assert copied == [ + (str(tmp_path / "metadata.csv"), str(tmp_path / "orig_metadata.csv")), + (str(tmp_path / "sequence.fsa"), str(tmp_path / "orig_sequence.fsa")), + ] + assert saved_df.to_dict("records") == [ + { + "submitter": "submitter1", + "fn": "sequence.fsa", + "covv_virus_name": "hCoV-19/USA/1/2024", + "covv_gender": "Female", + "collection_date": "2024-01-02", + "authors": "Smith, Jane", + } + ] + +@pytest.mark.parametrize( + ("organism", "sample_column", "sex_in", "sex_out"), + [ + ("POX", "pox_virus_name", "pox_sex", "pox_gender"), + ("ARBO", "arbo_virus_name", "arbo_sex", "arbo_gender"), + ("RSV", "rsv_virus_name", "rsv_sex", "rsv_gender"), + ], +) +def test_create_gisaid_files__non_cov_flu_organisms( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + organism: str, + sample_column: str, + sex_in: str, + sex_out: str, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + module.file_handler.saved_csvs.clear() + + metadata = pd.DataFrame( + { + "gs-sample_name": [f"{organism}/sample/1"], + f"gs-{sex_in}": ["unknown"], + "collection_date": ["2024"], + "authors": ["Doe, John"], + } + ) + + module.create_gisaid_files( + organism=organism, + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert_no_none_strings(saved_df) + assert list(saved_df.columns[:3]) == ["submitter", "fn", sample_column] + assert saved_df.loc[0, "submitter"] == "submitter1" + assert saved_df.loc[0, "fn"] == "sequence.fsa" + assert saved_df.loc[0, sample_column] == f"{organism}/sample/1" + assert saved_df.loc[0, sex_out] == "unknown" + assert sample_column not in ["", None] + assert sex_out not in ["", None] + +def test_create_gisaid_files__flu_pivots_segments_and_splits_dates(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["segHA", "segNA"], + "gs-Isolate_Name": ["iso1", "iso1"], + "gs-segment": ["HA", "NA"], + "gs-Host_Sex": ["Female", "Female"], + "collection_date": ["2024-05", "2024-05"], + "authors": ["Smith, Jane", "Smith, Jane"], + } + ) + + module.create_gisaid_files( + organism="FLU", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert list(saved_df.columns[:3]) == ["Isolate_Id", "Segment_Ids", "Isolate_Name"] + assert saved_df.loc[0, "Isolate_Id"] == "" + assert saved_df.loc[0, "Segment_Ids"] == "" + assert saved_df.loc[0, "Isolate_Name"] == "iso1" + assert saved_df.loc[0, "Collection_Date"] == "" + assert saved_df.loc[0, "Collection_Year"] == "2024" + assert saved_df.loc[0, "Collection_Month"] == "05" + assert saved_df.loc[0, "Authors"] == "Smith, Jane" + assert saved_df.loc[0, "Host_Gender"] == "Female" + assert saved_df.loc[0, "Seq_Id (HA)"] == "segHA" + assert saved_df.loc[0, "Seq_Id (NA)"] == "segNA" + +def test_create_gisaid_files__flu_uses_exact_segment_merge_arguments(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + monkeypatch.setattr(module.shutil, "copy", lambda src, dst: None) + observed_merges: list[dict[str, Any]] = [] + original_merge = module.pd.DataFrame.merge + + def fake_merge(self, right, *args, **kwargs): + observed_merges.append({"left_columns": self.columns.tolist(), "right_columns": right.columns.tolist(), "args": args, "kwargs": kwargs}) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + metadata = pd.DataFrame( + { + "gs-sample_name": ["segHA", "segNA"], + "gs-Isolate_Name": ["iso1", "iso1"], + "gs-segment": ["HA", "NA"], + "gs-Host_Sex": ["Female", "Female"], + "collection_date": ["2024-05", "2024-05"], + "authors": ["Smith, Jane", "Smith, Jane"], + } + ) + + module.create_gisaid_files(organism="FLU", database="GISAID", submission_name="sub1", submission_dir=str(tmp_path), config_dict={"Username": "submitter1"}, metadata=metadata) + assert observed_merges == [ + { + "left_columns": ["Isolate_Name", "Host_Gender", "Authors", "Collection_Date", "Collection_Year", "Collection_Month", "Isolate_Id", "Segment_Ids"], + "right_columns": ["Isolate_Name", "Seq_Id (HA)", "Seq_Id (NA)"], + "args": (), + "kwargs": { + "on": "Isolate_Name", + "how": "inner", + "validate": "1:1", + }, + } + ] +#******************************************************************************* +# process_gisaid_log +#******************************************************************************* +def test_process_gisaid_log__validates_exact_file_type_and_opens_read_mode(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('"msg": "hCoV-19/USA/CA-10/2024; EPI_ISL_101010"\n') + + original_open = open + observed_open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + observed_open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert module.file_handler.validate_file_calls == [{"file_type": "GISAID log", "file_path": str(log_file)}] + assert observed_open_calls == [(str(log_file), "r")] +def test_process_gisaid_log__standard_epi_id_regex_branch_uses_exact_uppercase_pattern(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("epi_id: hCoV-19/USA/CA-21/2024; EPI12345\n") + + def fake_findall(pattern, line): + assert pattern == r'(?:[a-zA-Z0-9_-]+(?:/[a-zA-Z0-9_-]+)+|EPI_\w*)' + return ["hCoV-19/USA/CA-21/2024", "EPI12345"] + + monkeypatch.setattr(module.re, "findall", fake_findall) + + with pytest.raises(KeyError, match="gisaid_accession_epi_isl_id"): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + captured = capsys.readouterr() + assert captured.out == "GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 1 + assert module.upload_log.update_calls[0]["update_database"] == "GISAID" + assert module.upload_log.update_calls[0]["submission_dir"] == str(tmp_path) + assert module.upload_log.update_calls[0]["update_df"].to_dict("records") == [ + { + "gs-segment_name": "hCoV-19/USA/CA-21/2024", + "gisaid_accession_epi_id": "EPI12345", + } + ] + +def test_process_gisaid_log__updates_for_isolate_and_existing_segment(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '\n'.join( + [ + '"msg": "hCoV-19/USA/CA-1/2024; EPI_ISL_12345"', + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-2/2024; [\'EPI_67890\']', + ] + ) + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates and GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 2 + assert module.upload_log.update_calls[0]["update_database"] == "GISAID" + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-1/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_12345", + } + ], + ) + + assert_update_call( + module.upload_log.update_calls[1], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-2/2024", + "gisaid_accession_epi_id": "EPI_67890", + } + ], + ) + +def test_process_gisaid_log__returns_only_failed_isolate_rows_and_filters_successes(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("placeholder\n") + original_dataframe = module.pd.DataFrame + + def fake_validate_file(file_type: str, file_path: str): + module.file_handler.validate_file_calls.append({"file_type": file_type, "file_path": file_path}) + + monkeypatch.setattr(module.file_handler, "validate_file", fake_validate_file) + + class FakeFile: + def __init__(self): + self.lines = iter(["placeholder\n", ""]) + + def readline(self): + return next(self.lines) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc, tb): + return False + + monkeypatch.setattr("builtins.open", lambda *args, **kwargs: FakeFile()) + + def fake_search(pattern, line): + return False + + monkeypatch.setattr(module.re, "search", fake_search) + call_count = {"value": 0} + + def fake_dataframe(rows=None, *args, **kwargs): + call_count["value"] += 1 + if call_count["value"] == 1: + return original_dataframe( + [ + { + "gs-sample_name": "success", + "gisaid_accession_epi_isl_id": "EPI_ISL_123", + }, + { + "gs-sample_name": "failed", + "gisaid_accession_epi_isl_id": "", + }, + { + "gs-sample_name": "missing", + "gisaid_accession_epi_isl_id": None, + }, + ] + ) + return original_dataframe(rows, *args, **kwargs) + + monkeypatch.setattr(module.pd, "DataFrame", fake_dataframe) + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + assert returned.to_dict("records") == [ + {"gs-sample_name": "failed"}, + {"gs-sample_name": "missing"}, + ] + +def test_process_gisaid_log__returns_failed_isolate_rows_without_accessions(tmp_path: Path, gisaid_handler_module): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-3/2024; []\n' + ) + + # This line matches the duplicate-sample branch but has no accession. The code records + # no isolate and currently falls through to the empty-dataframe bug covered below. + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + +def test_process_gisaid_log__no_accessions_currently_raises_keyerror(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text("no accession on this line\n") + + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert capsys.readouterr().out == ( + "Finished reading GISAID log. If workflow has failed here, " + "it's likely no GISAID IDs were returned. Check results in GISAID upload log.\n" + "Warning: no GISAID isolates or segments found\n" + ) + +#******************************************************************************* +# submit_gisaid +#******************************************************************************* + +def test_submit_gisaid__success_when_status_report_has_all_accessions(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + (submission_dir / "metadata.csv").write_text("placeholder\n") + (submission_dir / "sequence.fsa").write_text(">s1\nACGT\n") + pd.DataFrame({"covv_virus_name": ["hCoV-19/USA/CA-1/2024"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + (submission_dir / "orig_sequence.fsa").write_text(">hCoV-19/USA/CA-1/2024\nACGT\n") + pd.DataFrame( + { + "gs-sample_name": ["hCoV-19/USA/CA-1/2024"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_12345"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + assert command == [ + str(submission_dir / "covCLI"), + "upload", + "--username", + "u", + "--password", + "p", + "--clientid", + "cid", + "--metadata", + str(submission_dir / "metadata.csv"), + "--fasta", + str(submission_dir / "sequence.fsa"), + "--log", + str(submission_dir / "gisaid_upload_log_1.txt"), + "--debug", + ] + assert cwd == str(submission_dir) + assert stdout == module.subprocess.PIPE + assert stderr == module.subprocess.PIPE + + log_path = Path(command[command.index("--log") + 1]) + log_path.write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert sleep_calls == [5] + assert capsys.readouterr().out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "Uploading successfully\n" + f"Log file is stored at: {submission_dir}/gisaid_upload_log_attempt_1.txt\n" + ) + assert module.tools.check_credentials_calls == [ + {"config_dict": {"Username": "u", "Password": "p", "Client-Id": "cid"}, "database": "GISAID"} + ] + +def test_submit_gisaid__subprocess_failure_exits(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + (submission_dir / "metadata.csv").write_text("placeholder\n") + (submission_dir / "orig_metadata.csv").write_text("covv_virus_name\ns1\n") + (submission_dir / "sequence.fsa").write_text(">s1\nACGT\n") + (submission_dir / "orig_sequence.fsa").write_text(">s1\nACGT\n") + (tmp_path / "submission_status_report.csv").write_text("gs-sample_name,gisaid_accession_epi_isl_id\ns1,\n") + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_run(*args, **kwargs): + return types.SimpleNamespace(returncode=1, stdout=b"bad out", stderr=b"bad err") + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(SystemExit) as exc: + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + assert sleep_calls == [5] + captured = capsys.readouterr() + assert exc.value.code == 1 + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "b'bad out'\n" + "b'bad err'\n" + ) + assert captured.err == "Error: upload command error\n" + +#******************************************************************************* +# update_gisaid_files +#******************************************************************************* + +@pytest.mark.parametrize( + ("organism", "metadata_column", "fasta_name", "status_rows"), + [ + ("COV", "covv_virus_name", "sample1", {"gs-sample_name": ["sample1"]}), + ("POX", "pox_virus_name", "sample1", {"gs-sample_name": ["sample1"]}), + ( + "FLU", + "Isolate_Name", + "segHA", + {"gs-sample_name": ["iso1"], "gs-segment_name": ["segHA"]}, + ), + ], +) +def test_update_gisaid_files__filters_to_processed_genbank_rows_and_rewrites_files( + tmp_path: Path, + gisaid_handler_module, + organism: str, + metadata_column: str, + fasta_name: str, + status_rows: dict, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + original_metadata_value = "iso1" if organism == "FLU" else "sample1" + pd.DataFrame({metadata_column: [original_metadata_value, "dropme"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id=fasta_name, description=""), + SeqRecord(Seq("CCCC"), id="dropme", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + **{key: values + ["dropme"] for key, values in status_rows.items()}, + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism=organism, + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + assert (submission_dir / "metadata.csv").exists() + assert (submission_dir / "orig_metadata.csv").exists() + assert (submission_dir / "sequence.fsa").exists() + assert (submission_dir / "orig_sequence.fsa").exists() + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata[metadata_column].tolist() == [original_metadata_value] + rewritten_records = list(SeqIO.parse(submission_dir / "sequence.fsa", "fasta")) + assert [record.id for record in rewritten_records] == [fasta_name] + +def test_update_gisaid_files__genbank_status_filter_uses_na_false(tmp_path: Path, gisaid_handler_module): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", + index=False, + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + + pd.DataFrame( + { + "genbank-status": ["processed-ok", None], + "gs-sample_name": ["sample1", "sample2"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism="COV", + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata["covv_virus_name"].tolist() == ["sample1"] + + rewritten_fasta_ids = [ + record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta") + ] + assert rewritten_fasta_ids == ["sample1"] + +def test_update_gisaid_files__uses_exact_read_merge_drop_to_csv_and_open_args(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + metadata_path = submission_dir / "metadata.csv" + orig_metadata_path = submission_dir / "orig_metadata.csv" + fasta_path = submission_dir / "sequence.fsa" + orig_fasta_path = submission_dir / "orig_sequence.fsa" + status_path = tmp_path / "submission_status_report.csv" + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(metadata_path, index=False) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + orig_fasta_path, + "fasta", + ) + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + "gs-sample_name": ["sample1", "sample2"], + } + ).to_csv(status_path, index=False) + + original_read_csv = module.pd.read_csv + read_csv_calls: list[dict[str, Any]] = [] + + def fake_read_csv(*args, **kwargs): + read_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_read_csv(*args, **kwargs) + + monkeypatch.setattr(module.pd, "read_csv", fake_read_csv) + original_merge = module.pd.DataFrame.merge + merge_calls: list[dict[str, Any]] = [] + + def fake_merge(self, right, *args, **kwargs): + merge_calls.append( + { + "left_columns": self.columns.tolist(), + "right_columns": right.columns.tolist(), + "args": args, + "kwargs": kwargs, + } + ) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + original_drop = module.pd.DataFrame.drop + drop_calls: list[dict[str, Any]] = [] + + def fake_drop(self, *args, **kwargs): + drop_calls.append({"args": args, "kwargs": kwargs}) + return original_drop(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "drop", fake_drop) + original_to_csv = module.pd.DataFrame.to_csv + to_csv_calls: list[dict[str, Any]] = [] + + def fake_to_csv(self, *args, **kwargs): + to_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_to_csv(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "to_csv", fake_to_csv) + original_open = open + open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + if str(file).endswith(("orig_sequence.fsa", "sequence.fsa")): + open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + module.update_gisaid_files(organism="COV", submission_dir=str(submission_dir), submission_status_file=str(status_path)) + assert read_csv_calls == [ + { + "args": (str(status_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + { + "args": (str(metadata_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + ] + + assert merge_calls[0]["kwargs"] == { + "how": "inner", + "left_on": "covv_virus_name", + "right_on": "gs-sample_name", + } + + assert drop_calls[0]["kwargs"] == { + "columns": ["gs-sample_name", "gs-segment_name"], + "errors": "ignore", + } + + assert to_csv_calls[-1] == { + "args": (str(orig_metadata_path),), + "kwargs": { + "header": True, + "index": False, + }, + } + + assert open_calls == [ + (str(orig_fasta_path), "r"), + (str(fasta_path), "w+"), + ] + +def test_update_gisaid_files__no_processed_rows_writes_empty_files( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write([SeqRecord(Seq("AAAA"), id="sample1", description="")], submission_dir / "orig_sequence.fsa", "fasta") + pd.DataFrame( + { + "genbank-status": ["failed"], + "gs-sample_name": ["sample1"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + module.update_gisaid_files( + organism="COV", + submission_dir=str(submission_dir), + submission_status_file=str(tmp_path / "submission_status_report.csv"), + ) + + assert pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str).empty + assert list(SeqIO.parse(submission_dir / "sequence.fsa", "fasta")) == [] + +def test_process_flu_dates__trims_whitespace(gisaid_handler_module): + assert gisaid_handler_module.process_flu_dates(" 2024-07-03 ").tolist() == ["2024-07-03", "", ""] + + +def test_create_gisaid_files__unsupported_other_organism_currently_raises_unboundlocalerror( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + + monkeypatch.setattr(module.shutil, "copy", fake_copy) + + metadata = pd.DataFrame( + { + "gs-sample_name": ["OTHER/sample/1"], + "collection_date": ["2024"], + "authors": ["Doe, John"], + } + ) + + # Current behavior: create_gisaid_files has branches for COV/POX/ARBO/RSV and FLU, + # but not OTHER, leaving first_cols undefined. + with pytest.raises(UnboundLocalError): + module.create_gisaid_files( + organism="OTHER", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + +def test_create_gisaid_files__flu_full_date_populates_collection_date_column( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + + def fake_copy(src, dst): + return None + monkeypatch.setattr(module.shutil, "copy", fake_copy) + module.file_handler.saved_csvs.clear() + + metadata = pd.DataFrame( + { + "gs-sample_name": ["segPB2"], + "gs-Isolate_Name": ["iso-full-date"], + "gs-segment": ["PB2"], + "gs-Host_Sex": ["Male"], + "collection_date": ["2024-07-03"], + "authors": ["Smith, Jane"], + } + ) + + module.create_gisaid_files( + organism="FLU", + database="GISAID", + submission_name="sub1", + submission_dir=str(tmp_path), + config_dict={"Username": "submitter1"}, + metadata=metadata, + ) + + saved_df = module.file_handler.saved_csvs[0]["df"] + assert saved_df.loc[0, "Collection_Date"] == "2024-07-03" + assert saved_df.loc[0, "Collection_Year"] == "" + assert saved_df.loc[0, "Collection_Month"] == "" + assert saved_df.loc[0, "Seq_Id (PB2)"] == "segPB2" + + +def test_process_gisaid_log__missing_log_file_exits(tmp_path: Path, gisaid_handler_module): + with pytest.raises(SystemExit): + gisaid_handler_module.process_gisaid_log( + log_file=str(tmp_path / "missing.log"), + submission_dir=str(tmp_path), + ) +def test_submit_gisaid__post_loop_empty_metadata_returns_exact_processed(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv( + submission_dir / "orig_metadata.csv", + index=False, + ) + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv( + submission_dir / "metadata.csv", + index=False, + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description="")], + submission_dir / "sequence.fsa", + "fasta", + ) + + pd.DataFrame( + { + "gs-sample_name": ["sample1"], + "gisaid_accession_epi_isl_id": [""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + monkeypatch.setattr(module.time, "sleep", lambda seconds: None) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + + # On attempt 4, mutate the status file so the loop's final metadata_df becomes empty. + if command[command.index("--log") + 1].endswith("gisaid_upload_log_4.txt"): + pd.DataFrame( + { + "gs-sample_name": ["sample1"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_FINAL"], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + +def test_process_gisaid_log__existing_duplicate_isolate_accession_updates_status(tmp_path: Path, gisaid_handler_module, capsys): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + '"code": "validation_error" sample already exists; ' + "existing_virus_name: hCoV-19/USA/CA-3/2024; ['EPI_ISL_99999']\n" + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-3/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_99999", + } + ], +) + +def test_process_gisaid_log__standard_epi_id_message_currently_not_returned_as_segment( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('epi_id: hCoV-19/USA/CA-4/2024; EPI_ID_123456\n') + + # Current behavior: the line matches the broad regex, but the extracted accession + # EPI_ID_123456 does not satisfy re.match(r"EPI\d+", ...), so no segment row is + # recorded and the empty-dataframe bug is reached. + with pytest.raises(KeyError): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + +def test_submit_gisaid__partial_failure_rewrites_remaining_samples_then_retries_successfully( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="sample1", description=""), SeqRecord(Seq("CCCC"), id="sample2", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + (submission_dir / "sequence.fsa").write_text(">sample1\nAAAA\n>sample2\nCCCC\n") + status_file = tmp_path / "submission_status_report.csv" + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(status_file, index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + process_calls = {"count": 0} + + def fake_process_gisaid_log(**kwargs): + process_calls["count"] += 1 + if process_calls["count"] == 2: + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", "EPI_ISL_222"], + } + ).to_csv(status_file, index=False) + return pd.DataFrame() + + def fake_run(command, cwd, stdout, stderr): + log_path = Path(command[command.index("--log") + 1]) + log_path.write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert process_calls["count"] == 2 + # The first retry should rewrite the active files to only the unsubmitted sample. + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + active_fasta_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_fasta_ids == ["sample2"] + + +def test_submit_gisaid__returns_error_after_all_retry_attempts_have_remaining_samples(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch, capsys): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"covv_virus_name": ["sample1"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write([SeqRecord(Seq("AAAA"), id="sample1", description="")], submission_dir / "orig_sequence.fsa", "fasta") + (submission_dir / "sequence.fsa").write_text(">sample1\nAAAA\n") + pd.DataFrame( + {"gs-sample_name": ["sample1"], "gisaid_accession_epi_isl_id": [""]} + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + run_calls = [] + + def fake_run(command, cwd, stdout, stderr): + run_calls.append(command) + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + captured = capsys.readouterr() + + assert status == "ERROR" + assert sleep_calls == [5] + assert len(run_calls) == 4 + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. " + "If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "\n" + "Submission attempt: 2\n" + "\n" + "Submission attempt: 3\n" + "\n" + "Submission attempt: 4\n" + ) + assert captured.err == ( + "Error: 1 sample(s) failed to upload to GISAID\n" + f"Please check log file at: {submission_dir}/gisaid_upload_log_attempt_{{1,2,3}}.txt\n" + ) + + +def test_submit_gisaid__other_organism_uses_lowercase_virus_name_for_remaining_metadata( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"rsv_virus_name": ["rsv1", "rsv2"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"rsv_virus_name": ["rsv1", "rsv2"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id="rsv1", description=""), SeqRecord(Seq("CCCC"), id="rsv2", description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + (submission_dir / "sequence.fsa").write_text(">rsv1\nAAAA\n>rsv2\nCCCC\n") + status_file = tmp_path / "submission_status_report.csv" + pd.DataFrame( + {"gs-sample_name": ["rsv1", "rsv2"], "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""]} + ).to_csv(status_file, index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="RSV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "ERROR" + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + assert active_metadata["rsv_virus_name"].tolist() == ["rsv2"] + + +def test_update_gisaid_files__arbo_and_rsv_use_lowercase_virus_name_columns( + tmp_path: Path, + gisaid_handler_module, +): + module = gisaid_handler_module + + for organism in ["ARBO", "RSV"]: + submission_dir = tmp_path / organism / "GISAID" + submission_dir.mkdir(parents=True) + metadata_column = organism.lower() + "_virus_name" + pd.DataFrame({metadata_column: [f"{organism.lower()}1", "dropme"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id=f"{organism.lower()}1", description=""), + SeqRecord(Seq("CCCC"), id="dropme", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + status_file = submission_dir.parent / "submission_status_report.csv" + pd.DataFrame( + { + "genbank-status": ["processed-ok", "failed"], + "gs-sample_name": [f"{organism.lower()}1", "dropme"], + } + ).to_csv(status_file, index=False) + + module.update_gisaid_files( + organism=organism, + submission_dir=str(submission_dir), + submission_status_file=str(status_file), + ) + + rewritten_metadata = pd.read_csv(submission_dir / "orig_metadata.csv", dtype=str) + assert rewritten_metadata[metadata_column].tolist() == [f"{organism.lower()}1"] + assert [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] == [ + f"{organism.lower()}1" + ] + + +def test_submit_gisaid__rewrite_block_updates_active_metadata_and_fasta_before_next_attempt( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, +): + """Regression coverage for the retry block that rewrites metadata.csv and sequence.fsa.""" + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + # sample1 has an accession after the first attempt; sample2 should remain active. + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + assert active_ids == ["sample2"] + raise RuntimeError("stop after proving retry inputs were rewritten") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(RuntimeError, match="retry inputs were rewritten"): + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + +def test_submit_gisaid__uses_exact_read_csv_settings_for_status_and_orig_metadata(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + metadata_path = submission_dir / "metadata.csv" + orig_metadata_path = submission_dir / "orig_metadata.csv" + fasta_path = submission_dir / "sequence.fsa" + orig_fasta_path = submission_dir / "orig_sequence.fsa" + status_path = tmp_path / "submission_status_report.csv" + + metadata_path.write_text("covv_virus_name\nsample1\n") + orig_metadata_path.write_text("covv_virus_name\nsample1\n") + fasta_path.write_text(">sample1\nAAAA\n") + orig_fasta_path.write_text(">sample1\nAAAA\n") + status_path.write_text("gs-sample_name,gisaid_accession_epi_isl_id\nsample1,EPI_ISL_1\n") + + sleep_calls: list[int] = [] + monkeypatch.setattr(module.time, "sleep", lambda seconds: sleep_calls.append(seconds)) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + original_read_csv = module.pd.read_csv + observed_read_csv: list[dict[str, Any]] = [] + + def fake_read_csv(*args, **kwargs): + observed_read_csv.append({"args": args, "kwargs": kwargs}) + return original_read_csv(*args, **kwargs) + + monkeypatch.setattr(module.pd, "read_csv", fake_read_csv) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert status == "PROCESSED" + assert observed_read_csv == [ + { + "args": (str(status_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + { + "args": (str(orig_metadata_path),), + "kwargs": { + "header": 0, + "dtype": str, + "engine": "python", + "encoding": "utf-8", + "index_col": False, + }, + }, + ] + +def test_submit_gisaid__retry_rewrite_uses_exact_merge_drop_to_csv_and_open_args(tmp_path: Path, gisaid_handler_module, monkeypatch: pytest.MonkeyPatch): + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + status_path = tmp_path / "submission_status_report.csv" + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(status_path, index=False) + + sleep_calls: list[int] = [] + monkeypatch.setattr(module.time, "sleep", lambda seconds: sleep_calls.append(seconds)) + monkeypatch.setattr(module, "process_gisaid_log", lambda **kwargs: pd.DataFrame()) + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + raise RuntimeError("stop after first rewrite") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + original_merge = module.pd.DataFrame.merge + merge_calls: list[dict[str, Any]] = [] + + def fake_merge(self, right, *args, **kwargs): + merge_calls.append( + { + "left_columns": self.columns.tolist(), + "right_columns": right.columns.tolist(), + "args": args, + "kwargs": kwargs, + } + ) + return original_merge(self, right, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "merge", fake_merge) + original_drop = module.pd.DataFrame.drop + drop_calls: list[dict[str, Any]] = [] + + def fake_drop(self, *args, **kwargs): + drop_calls.append({"args": args, "kwargs": kwargs}) + return original_drop(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "drop", fake_drop) + original_to_csv = module.pd.DataFrame.to_csv + to_csv_calls: list[dict[str, Any]] = [] + + def fake_to_csv(self, *args, **kwargs): + to_csv_calls.append({"args": args, "kwargs": kwargs}) + return original_to_csv(self, *args, **kwargs) + + monkeypatch.setattr(module.pd.DataFrame, "to_csv", fake_to_csv) + original_open = open + open_calls: list[tuple[str, str]] = [] + + def fake_open(file, mode="r", *args, **kwargs): + if str(file).endswith(("orig_sequence.fsa", "sequence.fsa")): + open_calls.append((str(file), mode)) + return original_open(file, mode, *args, **kwargs) + + monkeypatch.setattr("builtins.open", fake_open) + with pytest.raises(RuntimeError, match="first rewrite"): + module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + + assert merge_calls[0]["kwargs"] == { + "how": "inner", + "left_on": "covv_virus_name", + "right_on": "gs-sample_name", + } + + assert drop_calls[0]["kwargs"] == { + "columns": ["gs-sample_name", "gs-segment_name"], + "errors": "ignore", + } + + assert to_csv_calls[-1] == { + "args": (os.path.join(str(submission_dir), "metadata.csv"),), + "kwargs": { + "header": True, + "index": False, + }, + } + + assert open_calls == [ + (str(submission_dir / "orig_sequence.fsa"), "r"), + (str(submission_dir / "sequence.fsa"), "w+"), + ] + +def test_submit_gisaid__after_retry_loop_returns_error_and_leaves_remaining_active_files( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + capsys, +): + """Covers the post-loop `if not metadata_df.empty: return "ERROR"` branch.""" + module = gisaid_handler_module + submission_dir = tmp_path / "GISAID" + submission_dir.mkdir() + + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "orig_metadata.csv", index=False + ) + pd.DataFrame({"covv_virus_name": ["sample1", "sample2"]}).to_csv( + submission_dir / "metadata.csv", index=False + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [ + SeqRecord(Seq("AAAA"), id="sample1", description=""), + SeqRecord(Seq("CCCC"), id="sample2", description=""), + ], + submission_dir / "sequence.fsa", + "fasta", + ) + # sample1 is complete, sample2 remains incomplete for every attempt. + pd.DataFrame( + { + "gs-sample_name": ["sample1", "sample2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_111", ""], + } + ).to_csv(tmp_path / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + def fake_run(command, cwd, stdout, stderr): + Path(command[command.index("--log") + 1]).write_text("ok\n") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + status = module.submit_gisaid( + organism="COV", + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + ) + captured = capsys.readouterr() + + assert status == "ERROR" + assert sleep_calls == [5] + assert captured.out == ( + "Uploading sample files to GISAID-COV, as a 'TEST' submission. " + "If this is not intended, interrupt immediately.\n" + "\n" + "Submission attempt: 1\n" + "\n" + "Submission attempt: 2\n" + "\n" + "Submission attempt: 3\n" + "\n" + "Submission attempt: 4\n" + ) + assert captured.err == ( + "Error: 1 sample(s) failed to upload to GISAID\n" + f"Please check log file at: {submission_dir}/gisaid_upload_log_attempt_{{1,2,3}}.txt\n" + ) + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata["covv_virus_name"].tolist() == ["sample2"] + assert active_ids == ["sample2"] + + +def test_process_gisaid_log__standard_message_isolate_branch_updates_status(tmp_path: Path, gisaid_handler_module, capsys): + """Covers the normal first regex branch for EPI_ISL_* accessions.""" + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('"msg": "hCoV-19/USA/CA-10/2024; EPI_ISL_101010"\n') + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-10/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_101010", + } + ], + ) + + +def test_process_gisaid_log__standard_message_segment_branch_updates_status_with_epi_digits(tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + capsys, +): + """Covers the `elif re.match(r"EPI\\d+", accession_string)` branch. + + The source regex accepts `EPI12345` in the broad line matcher, but the later + `findall` pattern only extracts `EPI_*` tokens. This test patches only the + extraction call so the intended branch is covered and documented. + """ + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text('epi_id: hCoV-19/USA/CA-11/2024; EPI12345\n') + + def fake_findall(pattern, line): + return ["hCoV-19/USA/CA-11/2024", "EPI12345"] + + monkeypatch.setattr(module.re, "findall", fake_findall) + + with pytest.raises(KeyError, match="gisaid_accession_epi_isl_id"): + module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert capsys.readouterr().out == "GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 1 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-11/2024", + "gisaid_accession_epi_id": "EPI12345", + } + ], + ) + + +def test_process_gisaid_log__existing_validation_error_isolate_and_segment_branches(tmp_path: Path, gisaid_handler_module, capsys): + """Covers both already-exists branches: EPI_ISL_* and EPI_* accessions.""" + module = gisaid_handler_module + log_file = tmp_path / "gisaid.log" + log_file.write_text( + "\n".join( + [ + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-12/2024; [\'EPI_ISL_121212\']', + '"code": "validation_error" sample already exists; existing_virus_name: hCoV-19/USA/CA-13/2024; [\'EPI_131313\']', + ] + ) + ) + + returned = module.process_gisaid_log(log_file=str(log_file), submission_dir=str(tmp_path)) + + assert returned.empty + assert capsys.readouterr().out == "GISAID isolates and GISAID segments found.\n" + assert len(module.upload_log.update_calls) == 2 + assert_update_call( + module.upload_log.update_calls[0], + tmp_path, + [ + { + "gs-sample_name": "hCoV-19/USA/CA-12/2024", + "gisaid_accession_epi_isl_id": "EPI_ISL_121212", + } + ], + ) + + assert_update_call( + module.upload_log.update_calls[1], + tmp_path, + [ + { + "gs-segment_name": "hCoV-19/USA/CA-13/2024", + "gisaid_accession_epi_id": "EPI_131313", + } + ], + ) + + +@pytest.mark.parametrize( + ( + "organism", + "metadata_column", + "fasta_column", + "metadata_values", + "fasta_ids", + "status_frame", + "expected_remaining_metadata", + "expected_remaining_fasta", + ), + [ + ( + "FLU", + "Isolate_Name", + "gs-segment_name", + ["iso1", "iso2"], + ["seg1", "seg2"], + pd.DataFrame( + { + "gs-sample_name": ["iso1", "iso2"], + "gs-segment_name": ["seg1", "seg2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + "gisaid_accession_epi_id": ["EPI123", ""], + } + ), + ["iso2"], + ["seg2"], + ), + ( + "COV", + "covv_virus_name", + "gs-sample_name", + ["cov1", "cov2"], + ["cov1", "cov2"], + pd.DataFrame( + { + "gs-sample_name": ["cov1", "cov2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + } + ), + ["cov2"], + ["cov2"], + ), + ( + "ARBO", + "arbo_virus_name", + "gs-sample_name", + ["arbo1", "arbo2"], + ["arbo1", "arbo2"], + pd.DataFrame( + { + "gs-sample_name": ["arbo1", "arbo2"], + "gisaid_accession_epi_isl_id": ["EPI_ISL_1", ""], + } + ), + ["arbo2"], + ["arbo2"], + ), + ], +) +def test_submit_gisaid__status_filter_branches_rewrite_remaining_metadata_and_fasta( + tmp_path: Path, + gisaid_handler_module, + monkeypatch: pytest.MonkeyPatch, + organism: str, + metadata_column: str, + fasta_column: str, + metadata_values: list[str], + fasta_ids: list[str], + status_frame: pd.DataFrame, + expected_remaining_metadata: list[str], + expected_remaining_fasta: list[str], +): + """Covers the FLU, COV, and non-COV/non-FLU filtering branches in submit_gisaid().""" + module = gisaid_handler_module + submission_dir = tmp_path / organism / "GISAID" + submission_dir.mkdir(parents=True) + + pd.DataFrame({metadata_column: metadata_values}).to_csv(submission_dir / "orig_metadata.csv", index=False) + pd.DataFrame({metadata_column: metadata_values}).to_csv(submission_dir / "metadata.csv", index=False) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id=fasta_ids[0], description=""), SeqRecord(Seq("CCCC"), id=fasta_ids[1], description="")], + submission_dir / "orig_sequence.fsa", + "fasta", + ) + SeqIO.write( + [SeqRecord(Seq("AAAA"), id=fasta_ids[0], description=""), SeqRecord(Seq("CCCC"), id=fasta_ids[1], description="")], + submission_dir / "sequence.fsa", + "fasta", + ) + status_frame.to_csv(submission_dir.parent / "submission_status_report.csv", index=False) + sleep_calls: list[int] = [] + + def fake_sleep(seconds): + sleep_calls.append(seconds) + + def fake_process_gisaid_log(**kwargs): + return pd.DataFrame() + + monkeypatch.setattr(module.time, "sleep", fake_sleep) + monkeypatch.setattr(module, "process_gisaid_log", fake_process_gisaid_log) + + run_calls = {"count": 0} + + def fake_run(command, cwd, stdout, stderr): + run_calls["count"] += 1 + Path(command[command.index("--log") + 1]).write_text("ok\n") + if run_calls["count"] == 2: + active_metadata = pd.read_csv(submission_dir / "metadata.csv", dtype=str) + active_ids = [record.id for record in SeqIO.parse(submission_dir / "sequence.fsa", "fasta")] + assert active_metadata[metadata_column].tolist() == expected_remaining_metadata + assert active_ids == expected_remaining_fasta + raise RuntimeError(f"{organism} retry inputs were rewritten") + return types.SimpleNamespace(returncode=0, stdout=b"", stderr=b"") + + monkeypatch.setattr(module.subprocess, "run", fake_run) + + with pytest.raises(RuntimeError, match=f"{organism} retry inputs were rewritten"): + module.submit_gisaid( + organism=organism, + submission_dir=str(submission_dir), + submission_name="sub1", + config_dict={"Username": "u", "Password": "p", "Client-Id": "cid"}, + submission_type="TEST", + )